private Result(ILocated located, IContext next, bool isSuccess, IEnumerable <INode> nodes) { Location = located.Location; Next = next; IsSuccess = isSuccess; Nodes = nodes.ToList(); }
protected Message(MessageSeverity severity, MessageCode code, ILocated located) { Severity = severity; Code = code; Location = located.Location; Msg = Subject(Location); }
private Identifier(ILocated located, string name) : base(located) { Parts = new List <IdPart> { new IdPart(located, name) }; }
public FailResult(ILocated located, IContext next) : base(located, next, false, Empty) { if (FarthestFail == null || located.Location.Start > FarthestFail.Location.Start) { FarthestFail = this; } }
public static IResult Fail(ILocated located, IContext next) { if (located == null) { throw new InternalNullException(); } return(new FailResult(located, next)); }
protected internal Expression(ILocated located) { if (located == null) { throw new ArgumentNullException(nameof(located)); } Location = located.Location; }
public static Identifier From(ILocated located, IEnumerable <Identifier> identifiers) { if (identifiers == null) { throw new ArgumentNullException(nameof(identifiers)); } return(new Identifier(located, identifiers)); }
private Identifier(ILocated located, IEnumerable <Identifier> identifiers) : base(located) { var parts = new List <IdPart>(); foreach (var identifier in identifiers) { parts.AddRange(identifier.Parts); } Parts = parts; }
public IdPart(ILocated located, string name) { if (string.IsNullOrEmpty(name)) { throw new ArgumentNullException(nameof(name)); } if (located == null) { throw new ArgumentNullException(nameof(located)); } Location = located.Location; Name = name; }
public LocationPickerViewModel(ILocated item) { BasinMapViewModel = new BasinMapViewModel(new List <BasinMapLayer> { // new BasinMapReaches() //marker isn't showing up when reaches are visible }); BasinMapViewModel.PropertyChanged += (sender, args) => { if (args.PropertyName == nameof(BasinMapViewModel.SelectedPoint)) { PointSelected(BasinMapViewModel.SelectedPoint); } }; if (item.Location.Latitude > 0 && item.Location.Longitude > 0) { PointSelected(new MapPoint(item.Location.Longitude, item.Location.Latitude, new SpatialReference(item.Location.Wkid))); } }
public static ClassRangeExpression From(ILocated located, int min, int max) { return(new ClassRangeExpression(located, min, max)); }
public static InlineExpression From(ILocated located, IRule rule) { return(new InlineExpression(located, rule)); }
private void SelectText(ILocated loc) { SelectText(loc.File, loc.Span); }
private Leaf(ILocated located, string name, string value) { Location = located.Location; Name = name; Value = value; }
public MessageWarning(MessageCode code, ILocated located) : base(MessageSeverity.Warning, code, located) { }
private StarExpression(ILocated located, Expression expression) : base(located, expression) { }
private AndExpression(ILocated located, Expression expression) : base(located, expression) { }
private AnyExpression(ILocated located) : base(located) { }
private void SelectText(ILocated loc) { SelectText(loc.Location); }
public static StarExpression From(ILocated located, Expression expression) { return(new StarExpression(located, expression)); }
protected internal SimpleExpression(ILocated located) : base(located) { }
protected internal WithInnerExpression(ILocated located, Expression expression) : base(located) { Expression = expression; }
private Leaf(ILocated located, string name) { Location = located.Location; Name = name; Value = string.Empty; }
public RejectedException(IModifier modifier, ILocated input) : base(modifier) { _input = input; }
public static INode From(ILocated located, string name, string value) => new Leaf(located, name, value);
public static NameExpression From(ILocated located, Identifier identifier) { return(new NameExpression(located, identifier)); }
private NameExpression(ILocated located, Identifier identifier) : base(located) { Identifier = identifier; }
private ClassRangeExpression(ILocated located, int min, int max) : base(located) { Min = min; Max = max; }
protected SuffixExpression(ILocated located, Expression expression) : base(located, expression) { }
private InlineExpression(ILocated located, IRule inlineRule) : base(located) { InlineRule = inlineRule; Rule = inlineRule; }
public static double DistanceTo(this ILocated obj1, ILocated obj2) { var dx = obj1.X - obj2.X; var dy = obj1.Y - obj2.Y; return Math.Sqrt(dx * dx + dy * dy); }