Esempio n. 1
0
        internal DisplayClassVariable SubstituteFields(
            DisplayClassInstance otherInstance,
            TypeMap typeMap
            )
        {
            var otherFields = SubstituteFields(this.DisplayClassFields, typeMap);

            return(new DisplayClassVariable(this.Name, this.Kind, otherInstance, otherFields));
        }
Esempio n. 2
0
        internal DisplayClassVariable(string name, DisplayClassVariableKind kind, DisplayClassInstance displayClassInstance, ConsList <FieldSymbol> displayClassFields)
        {
            Debug.Assert(displayClassFields.Any());

            this.Name = name;
            this.Kind = kind;
            this.DisplayClassInstance = displayClassInstance;
            this.DisplayClassFields   = displayClassFields;

            // Verify all type parameters are substituted.
            Debug.Assert(this.ContainingSymbol.IsContainingSymbolOfAllTypeParameters(this.Type));
        }
        internal DisplayClassVariable(string name, DisplayClassVariableKind kind, DisplayClassInstance displayClassInstance, ConsList<FieldSymbol> displayClassFields)
        {
            Debug.Assert(displayClassFields.Any());

            this.Name = name;
            this.Kind = kind;
            this.DisplayClassInstance = displayClassInstance;
            this.DisplayClassFields = displayClassFields;

            // Verify all type parameters are substituted.
            Debug.Assert(this.ContainingSymbol.IsContainingSymbolOfAllTypeParameters(this.Type));
        }
Esempio n. 4
0
 private DisplayClassInstanceAndFields(DisplayClassInstance instance, ConsList<FieldSymbol> fields)
 {
     this.Instance = instance;
     this.Fields = fields;
 }
Esempio n. 5
0
 internal DisplayClassInstanceAndFields(DisplayClassInstance instance) :
     this(instance, ConsList<FieldSymbol>.Empty)
 {
     Debug.Assert(IsDisplayClassType(instance.Type) ||
         GeneratedNames.GetKind(instance.Type.Name) == GeneratedNameKind.AnonymousType);
 }
 internal DisplayClassVariable SubstituteFields(DisplayClassInstance otherInstance, TypeMap typeMap)
 {
     var otherFields = SubstituteFields(this.DisplayClassFields, typeMap);
     return new DisplayClassVariable(this.Name, this.Kind, otherInstance, otherFields);
 }
 internal DisplayClassInstanceAndFields(DisplayClassInstance instance) :
     this(instance, ConsList<FieldSymbol>.Empty)
 {
     Debug.Assert(IsDisplayClassType(instance.Type));
 }