/// <inheritdoc /> public override IDictionary <char, State> NextStates() { if (this.nextstates == null) { NullContext context = this.Context; this.nextstates = context.Parent?.GetInitialState(context)?.NextStates(); } return(this.nextstates); }
/// <inheritdoc /> public override bool Equals(object obj) { if (obj == this) { return(true); } NullContext other = obj as NullContext; if (other == null) { return(false); } return(base.Equals(other)); }
/// <summary> /// Creates a <see cref="NullContext"/> from the specified byte array. /// </summary> /// <param name="buffer">The buffer to read the <see cref="NullContext"/> from.</param> /// <returns>The <see cref="NullContext"/> this method creates.</returns> public static NullContext FromMemory(byte[] buffer) { return(NullContext.FromString(UTF8Encoding.UTF8.GetString(buffer))); }
/// <summary> /// Creates a <see cref="NullContext"/> from the specified file. /// </summary> /// <param name="fileName">A string that contains the name of the file from which to create the <see cref="NullContext"/>.</param> /// <returns>The <see cref="NullContext"/> this method creates.</returns> public static NullContext FromFile(string fileName) { return(NullContext.FromString(File.ReadAllText(fileName, Encoding.UTF8))); }
/// <summary> /// Initializes a new instance of the <see cref="NullContext"/> class, using the existing <see cref="NullContext"/> object. /// </summary> /// <param name="other">The <see cref="NullContext"/> to copy the data from.</param> public NullContext(NullContext other) : base(other) { }
public NullState(NullContext context) : base((char)0, false, false, 0.0f, 0.0f, false, 0) { this.Context = context; }