internal EndTagUnmatched(System.Exception innerException, string startName, Uri.Region startRegion, string endName, Uri.Region endRegion) : base(innerException, Error.Level.Recoverable, "XML Tree error", "XML end element \"{5}\" between row {6} column {7} and row {8} column {9} does not match start element \"{0}\" between row {1} column {2} and row {3} column {4} in \"{10}\".", startName, startRegion.Start.Row.ToString(), startRegion.Start.Column.ToString(), startRegion.End.Row.ToString(), startRegion.End.Column.ToString(), endName, endRegion.Start.Row.ToString(), endRegion.Start.Column.ToString(), endRegion.End.Row.ToString(), endRegion.End.Column.ToString(), endRegion.Resource) { this.StartName = startName; this.StartRegion = startRegion; this.EndName = endName; this.EndRegion = endRegion; }
public object this[Uri.Locator locator] { get { return this.targets[locator]; } set { if (locator.NotNull() && value.NotNull()) { if (this.targets[locator].IsNull()) { this.targets[locator] = value; if (this.reverse[value].IsNull()) this.reverse[value] = locator; Action<object> looseEnd = this.looseEnds[locator]; if (looseEnd.NotNull()) looseEnd.Call(value); } else new Exception.DuplicateIdentifier(locator).Throw(); } } }
public static Sender Connect(Uri.Endpoint endPoint) { return endPoint.Port.HasValue ? new Sender(new System.Net.Sockets.UdpClient(endPoint.Host, (int)endPoint.Port.Value)) { Resource = new Uri.Locator("udp://", new Uri.Authority(null, endPoint), null) } : null; }
public bool Resolve(Uri.Locator locator, Action<object> set) { bool result; object target = this.targets[locator]; if (result = target.NotNull()) set.Call(target); else { Action<object> looseEnd = this.looseEnds[locator]; if (looseEnd.NotNull()) looseEnd += set; else this.looseEnds[locator] = set; } return result; }
internal Uri.Locator Update(object data, Uri.Locator locator) { Uri.Locator result = null; if (!data.Type().Category.IsValue()) { result = this[data]; if (result.IsNull()) this[data] = locator; } return result; }
internal abstract Collection Add (string label, Uri.Region region, Item item);
protected Collection (Uri.Region region) : base(region) { }
protected Primitive(Uri.Region region) : base(region) { }
internal EndTagUnmatched(string startName, Uri.Region startRegion, string endName, Uri.Region endRegion) : this(null, startName, startRegion, endName, endRegion) { }
public static Connection Connect(Uri.Endpoint endPoint) { return endPoint.Port.HasValue ? new Connection(new System.Net.Sockets.TcpClient(endPoint.Host, (int)endPoint.Port.Value)) : null; }
public Region(Uri.Locator resource, Uri.Position start, Uri.Position end) : base(resource, start, end) { }
internal StartTagMissing(System.Exception innerException, string name, Uri.Region region) : base(innerException, Error.Level.Recoverable, "XML Tree error", "XML end element \"{0}\" between row {1} column {2} and row {3} column {4} does not have a corresponding start tag in \"{5}\".", name, region.Start.Row.ToString(), region.Start.Column.ToString(), region.End.Row.ToString(), region.End.Column.ToString(), region.Resource) { this.Name = name; this.Region = region; }
internal StartTagMissing(string name, Uri.Region region) : this(null, name, region) { }
public static ICharacterReader Open(Uri.Locator resource) { return CharacterReader.Open(CharacterDevice.Open(resource)); }