示例#1
0
 internal AnonymousTypePropertySymbol(AnonymousTypePublicSymbol container, AnonymousTypeField field)
 {
     _containingType = container;
     _type           = field.Type;
     _name           = field.Name;
     _locations      = ImmutableArray.Create <Location>(field.Location);
     _getMethod      = new AnonymousTypePropertyGetAccessorSymbol(this);
     _backingField   = null;
 }
示例#2
0
 internal AnonymousTypePropertySymbol(AnonymousTypeTemplateSymbol container, AnonymousTypeField field, TypeSymbol fieldTypeSymbol)
 {
     _containingType = container;
     _type           = fieldTypeSymbol;
     _name           = field.Name;
     _locations      = ImmutableArray <Location> .Empty;
     _getMethod      = new AnonymousTypePropertyGetAccessorSymbol(this);
     _backingField   = new AnonymousTypeFieldSymbol(this);
 }
 internal AnonymousTypePropertySymbol(AnonymousTypeTemplateSymbol container, AnonymousTypeField field, TypeSymbol fieldTypeSymbol)
 {
     this.containingType = container;
     this.type = fieldTypeSymbol;
     this.name = field.Name;
     this.locations = ImmutableArray<Location>.Empty;
     this.getMethod = new AnonymousTypePropertyGetAccessorSymbol(this);
     this.backingField = new AnonymousTypeFieldSymbol(this);
 }
 internal AnonymousTypePropertySymbol(AnonymousTypePublicSymbol container, AnonymousTypeField field)
 {
     this.containingType = container;
     this.type = field.Type;
     this.name = field.Name;
     this.locations = ImmutableArray.Create<Location>(field.Location);
     this.getMethod = new AnonymousTypePropertyGetAccessorSymbol(this);
     this.backingField = null;
 }
            private AnonymousTypePropertySymbol(
                NamedTypeSymbol container,
                AnonymousTypeField field,
                TypeWithAnnotations fieldTypeWithAnnotations,
                int index,
                ImmutableArray <Location> locations,
                bool includeBackingField)
            {
                Debug.Assert((object)container != null);
                Debug.Assert((object)field != null);
                Debug.Assert(fieldTypeWithAnnotations.HasType);
                Debug.Assert(index >= 0);
                Debug.Assert(!locations.IsDefault);

                _containingType      = container;
                _typeWithAnnotations = fieldTypeWithAnnotations;
                _name         = field.Name;
                _index        = index;
                _locations    = locations;
                _getMethod    = new AnonymousTypePropertyGetAccessorSymbol(this);
                _backingField = includeBackingField ? new AnonymousTypeFieldSymbol(this) : null;
            }