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 BitMapItem( BitMap map, LocatedVal <uint> value, LocatedRef <string> symbol, LocalizedString message) : base(value, message, symbol) { this.map = map ?? throw new ArgumentNullException(nameof(map)); }
public Keyword(LocatedRef <QName> name, LocatedVal <ulong> mask, LocatedRef <string> symbol, LocalizedString message) : this(name, mask) { Symbol = symbol; Message = message; }
public Opcode( LocatedRef <QName> name, LocatedVal <byte> value, LocatedRef <string> symbol, LocalizedString message) : this(name, value) { Symbol = symbol; Message = message; }
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 Level(LocatedRef <QName> name, LocatedVal <byte> value) { if (name == null) { throw new ArgumentNullException(nameof(name)); } Name = name; Value = value; }
public static void ReportError <T, TProperty>( T entity, LocatedVal <TProperty> value, IDiagnostics diags, IUniqueConstraint <T> constraint) where TProperty : struct { diags.ReportError(value.Location, constraint.FormatMessage(entity)); }
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 LocatedVal <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 void ImplicitConversion() { var value = new X(); X convertedValue = new LocatedVal <X>(value, new SourceLocation()); LocatedVal <X> convertedVal = convertedValue; Assert.Equal(value, convertedValue); Assert.Equal(value, convertedVal.Value); Assert.Null(convertedVal.Location); }
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 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 LocatedVal <EquatableX>(sameValue, location); var same = new LocatedVal <EquatableX>(sameValue); var equal = new LocatedVal <EquatableX>(equalValue); var notEqual = new LocatedVal <EquatableX>(notEqualValue); var sameWithLoc = new LocatedVal <EquatableX>(sameValue, otherLocation); var equalWithLoc = new LocatedVal <EquatableX>(equalValue, otherLocation); var notEqualWithLoc = new LocatedVal <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 LocatedVal <ComparableX>(sameValue, location); var same = new LocatedVal <ComparableX>(sameValue); var equal = new LocatedVal <ComparableX>(equalValue); var smaller = new LocatedVal <ComparableX>(smallerValue); var larger = new LocatedVal <ComparableX>(largerValue); var sameWithLoc = new LocatedVal <ComparableX>(sameValue, otherLocation); var equalWithLoc = new LocatedVal <ComparableX>(equalValue, otherLocation); var smallerWithLoc = new LocatedVal <ComparableX>(smallerValue, otherLocation); var largerWithLoc = new LocatedVal <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 Event(LocatedVal <uint> value, LocatedVal <byte> version) { Value = value; Version = version; }
public Event(LocatedVal <uint> value) : this(value, new LocatedVal <byte>(0)) { }
public Filter( LocatedRef <QName> name, LocatedVal <byte> value) : this(name, value, new LocatedVal <byte>(0)) { }
public Task(LocatedRef <QName> name, LocatedVal <ushort> value) { Name = name ?? throw new ArgumentNullException(nameof(name)); Value = value; }
protected MapItem(LocatedVal <uint> value, LocalizedString message) { Value = value; Message = message ?? throw new ArgumentNullException(nameof(message)); }
protected MapItem(LocatedVal <uint> value, LocalizedString message, LocatedRef <string> symbol) : this(value, message) { Symbol = symbol; }
public ValueMapItem(ValueMap map, LocatedVal <uint> value, LocalizedString message) : base(value, message) { Map = map ?? throw new ArgumentNullException(nameof(map)); }
public Opcode(LocatedRef <QName> name, LocatedVal <byte> value) { Name = name ?? throw new ArgumentNullException(nameof(name)); Value = value; }