public Provider( LocatedRef <string> name, LocatedVal <Guid> id, LocatedRef <string> symbol) { if (name == null) { throw new ArgumentNullException(nameof(name)); } if (symbol == null) { throw new ArgumentNullException(nameof(symbol)); } Name = name; Id = id; Symbol = symbol; Channels = new ChannelCollection(this); Levels = new LevelCollection(this); Opcodes = new OpcodeCollection(this); Tasks = new TaskCollection(this); Keywords = new KeywordCollection(this); Maps = new MapCollection(this); NamedQueries = new PatternMapCollection(this); Filters = new FilterCollection(this); Templates = new TemplateCollection(this); Events = new EventCollection(this); }
public Keyword(LocatedRef <QName> name, LocatedVal <ulong> mask, LocatedRef <string> symbol, LocalizedString message) : this(name, mask) { Symbol = symbol; Message = message; }
public BitMapItem( BitMap map, LocatedVal <uint> value, LocatedRef <string> symbol, LocalizedString message) : base(value, message, symbol) { this.map = map ?? throw new ArgumentNullException(nameof(map)); }
public static void ReportError <T, TProperty>( T entity, LocatedRef <TProperty> value, IDiagnostics diags, IUniqueConstraint <T> constraint) where TProperty : class { diags.ReportError(value.Location, constraint.FormatMessage(entity)); }
public Opcode( LocatedRef <QName> name, LocatedVal <byte> value, LocatedRef <string> symbol, LocalizedString message) : this(name, value) { Symbol = symbol; Message = message; }
public Level(LocatedRef <QName> name, LocatedVal <byte> value) { if (name == null) { throw new ArgumentNullException(nameof(name)); } Name = name; Value = value; }
public Template(LocatedRef <string> id) { if (id == null) { throw new ArgumentNullException(nameof(id)); } Id = id; Properties = new PropertyCollection(); }
public Channel(LocatedRef <string> name, LocatedVal <ChannelType> type) { if (name == null) { throw new ArgumentNullException(nameof(name)); } Name = name; Type = type; }
public Provider( LocatedRef <string> name, LocatedVal <Guid> id, LocatedRef <string> symbol, LocalizedString message) : this(name, id, symbol) { Message = message; }
public Keyword(LocatedRef <QName> name, LocatedVal <ulong> mask) { if (name == null) { throw new ArgumentNullException(nameof(name)); } Name = name; Mask = mask; }
public void Constructor() { var value = new X(); var location = new SourceLocation("z:\\foo", 23, 42); var located = new LocatedRef <X>(value, location); Assert.Equal(value, located.Value); Assert.Equal(location, located.Location); }
public Task( LocatedRef <QName> name, LocatedVal <ushort> value, LocatedRef <string> symbol, LocatedNullable <Guid> guid, LocalizedString message) : this(name, value) { Symbol = symbol; Guid = guid; Message = message; }
public Filter( LocatedRef <QName> name, LocatedVal <byte> value, LocatedVal <byte> version, LocatedRef <string> symbol, LocalizedString message) : this(name, value, version) { Symbol = symbol; Message = message; }
public void ImplicitConversion() { var value = new X(); X convertedValue = new LocatedRef <X>(value, new SourceLocation()); LocatedRef <X> convertedRef = convertedValue; Assert.Same(value, convertedValue); Assert.Same(value, convertedRef.Value); Assert.Null(convertedRef.Location); }
public Filter( LocatedRef <QName> name, LocatedVal <byte> value, LocatedVal <byte> version) { if (name == null) { throw new ArgumentNullException(nameof(name)); } Name = name; Value = value; Version = version; }
public void Equatable() { var sameValue = new EquatableX(1); var equalValue = new EquatableX(1); var notEqualValue = new EquatableX(3); var location = new SourceLocation("a", 1, 1); var otherLocation = new SourceLocation("b", 2, 2); var located = new LocatedRef <EquatableX>(sameValue, location); var same = new LocatedRef <EquatableX>(sameValue); var equal = new LocatedRef <EquatableX>(equalValue); var notEqual = new LocatedRef <EquatableX>(notEqualValue); var sameWithLoc = new LocatedRef <EquatableX>(sameValue, otherLocation); var equalWithLoc = new LocatedRef <EquatableX>(equalValue, otherLocation); var notEqualWithLoc = new LocatedRef <EquatableX>(notEqualValue, otherLocation); Assert.True(located.Equals(located)); Assert.True(located.Equals(same)); Assert.True(located.Equals(equal)); Assert.False(located.Equals(notEqual)); Assert.True(located.Equals(sameWithLoc)); Assert.True(located.Equals(equalWithLoc)); Assert.False(located.Equals(notEqualWithLoc)); Assert.True(located.Equals((object)same)); Assert.True(located.Equals((object)equal)); Assert.False(located.Equals((object)notEqual)); Assert.True(located.Equals((object)sameWithLoc)); Assert.True(located.Equals((object)equalWithLoc)); Assert.False(located.Equals((object)notEqualWithLoc)); Assert.True(located.Equals(sameValue)); Assert.True(located.Equals(equalValue)); Assert.False(located.Equals(notEqualValue)); Assert.True(located.Equals((object)sameValue)); Assert.True(located.Equals((object)equalValue)); Assert.False(located.Equals((object)notEqualValue)); Assert.True(located.Equals((object)sameValue.Value)); Assert.True(located.Equals((object)equalValue.Value)); Assert.False(located.Equals((object)notEqualValue.Value)); }
public void Comparable() { var sameValue = new ComparableX(10); var equalValue = new ComparableX(10); var smallerValue = new ComparableX(9); var largerValue = new ComparableX(11); var location = new SourceLocation("a", 1, 1); var otherLocation = new SourceLocation("b", 2, 2); var located = new LocatedRef <ComparableX>(sameValue, location); var same = new LocatedRef <ComparableX>(sameValue); var equal = new LocatedRef <ComparableX>(equalValue); var smaller = new LocatedRef <ComparableX>(smallerValue); var larger = new LocatedRef <ComparableX>(largerValue); var sameWithLoc = new LocatedRef <ComparableX>(sameValue, otherLocation); var equalWithLoc = new LocatedRef <ComparableX>(equalValue, otherLocation); var smallerWithLoc = new LocatedRef <ComparableX>(smallerValue, otherLocation); var largerWithLoc = new LocatedRef <ComparableX>(largerValue, otherLocation); Assert.Equal(0, located.CompareTo(located)); Assert.Equal(0, located.CompareTo(same)); Assert.Equal(0, located.CompareTo(equal)); Assert.Equal(1, located.CompareTo(smaller)); Assert.Equal(-1, located.CompareTo(larger)); Assert.Equal(0, located.CompareTo(sameWithLoc)); Assert.Equal(0, located.CompareTo(equalWithLoc)); Assert.Equal(1, located.CompareTo(smallerWithLoc)); Assert.Equal(-1, located.CompareTo(largerWithLoc)); Assert.Equal(0, located.CompareTo(sameValue)); Assert.Equal(0, located.CompareTo(equalValue)); Assert.Equal(1, located.CompareTo(smallerValue)); Assert.Equal(-1, located.CompareTo(largerValue)); }
public PatternMapItem(PatternMap map, LocatedRef <string> name, LocatedRef <string> value) { Map = map ?? throw new ArgumentNullException(nameof(map)); Name = name ?? throw new ArgumentNullException(nameof(name)); Value = value; }
protected Map(LocatedRef <string> name, LocatedRef <string> symbol) : this(name) { Symbol = symbol; }
public Task(LocatedRef <QName> name, LocatedVal <ushort> value) { Name = name ?? throw new ArgumentNullException(nameof(name)); Value = value; }
public BitMap(LocatedRef <string> name) : base(name) { }
protected MapItem(LocatedVal <uint> value, LocalizedString message, LocatedRef <string> symbol) : this(value, message) { Symbol = symbol; }
protected Property(LocatedRef <string> name) { Name = name ?? throw new ArgumentNullException(nameof(name)); }
public Opcode(LocatedRef <QName> name, LocatedVal <byte> value) { Name = name ?? throw new ArgumentNullException(nameof(name)); Value = value; }
public PatternMap( LocatedRef <string> name, LocatedRef <string> format, LocatedRef <string> symbol) : this(name, format) { Symbol = symbol; }
public ValueMap(LocatedRef <string> name) : base(name) { }
public StructProperty(LocatedRef <string> name) : base(name) { }
public DataProperty(LocatedRef <string> name, InType inType) : base(name) { InType = inType ?? throw new ArgumentNullException(nameof(inType)); }
public PatternMap(LocatedRef <string> name, LocatedRef <string> format) { Name = name ?? throw new ArgumentNullException(nameof(name)); Format = format ?? throw new ArgumentNullException(nameof(format)); }
public ValueMap(LocatedRef <string> name, LocatedRef <string> symbol) : base(name, symbol) { }