Terraria 1.4.0.5 Source Code
This commit is contained in:
commit
05205f009e
1059 changed files with 563450 additions and 0 deletions
17
Testing/ChatCommands/ArgumentHelper.cs
Normal file
17
Testing/ChatCommands/ArgumentHelper.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Decompiled with JetBrains decompiler
|
||||
// Type: Terraria.Testing.ChatCommands.ArgumentHelper
|
||||
// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83
|
||||
// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Terraria.Testing.ChatCommands
|
||||
{
|
||||
public static class ArgumentHelper
|
||||
{
|
||||
public static ArgumentListResult ParseList(string arguments) => new ArgumentListResult(((IEnumerable<string>) arguments.Split(' ')).Select<string, string>((Func<string, string>) (arg => arg.Trim())).Where<string>((Func<string, bool>) (arg => (uint) arg.Length > 0U)));
|
||||
}
|
||||
}
|
40
Testing/ChatCommands/ArgumentListResult.cs
Normal file
40
Testing/ChatCommands/ArgumentListResult.cs
Normal file
|
@ -0,0 +1,40 @@
|
|||
// Decompiled with JetBrains decompiler
|
||||
// Type: Terraria.Testing.ChatCommands.ArgumentListResult
|
||||
// Assembly: Terraria, Version=1.4.0.5, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 67F9E73E-0A81-4937-A22C-5515CD405A83
|
||||
// Assembly location: C:\Users\mikeyisbaeyt\Downloads\depotdownloader-2.4.5\depots\105601\6707058\Terraria.exe
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Terraria.Testing.ChatCommands
|
||||
{
|
||||
public class ArgumentListResult : IEnumerable<string>, IEnumerable
|
||||
{
|
||||
public static readonly ArgumentListResult Empty = new ArgumentListResult(true);
|
||||
public static readonly ArgumentListResult Invalid = new ArgumentListResult(false);
|
||||
public readonly bool IsValid;
|
||||
private readonly List<string> _results;
|
||||
|
||||
public int Count => this._results.Count;
|
||||
|
||||
public string this[int index] => this._results[index];
|
||||
|
||||
public ArgumentListResult(IEnumerable<string> results)
|
||||
{
|
||||
this._results = results.ToList<string>();
|
||||
this.IsValid = true;
|
||||
}
|
||||
|
||||
private ArgumentListResult(bool isValid)
|
||||
{
|
||||
this._results = new List<string>();
|
||||
this.IsValid = isValid;
|
||||
}
|
||||
|
||||
public IEnumerator<string> GetEnumerator() => (IEnumerator<string>) this._results.GetEnumerator();
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator() => (IEnumerator) this.GetEnumerator();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue