Esempio n. 1
0
 public ClrObjectMetadata(Type baseType)
 {
     this.baseType          = baseType;
     this.isNameScope       = null;
     this.supportsInlineXml = typeof(IXmlSerializable).IsAssignableFrom(baseType);
     this.nameProperty      = new DelayedInstance <IProperty>(() => {
         IProperty nameProperty = ((PlatformTypes)this.typeResolver.PlatformMetadata).GetNameProperty(this.typeResolver, this.baseType);
         if (nameProperty != null && (nameProperty.WriteAccess & MemberAccessType.Public) != MemberAccessType.None)
         {
             return(nameProperty);
         }
         return(this.TypeResolver.ResolveProperty(this.typeResolver.PlatformMetadata.KnownProperties.DesignTimeXName));
     });
 }
Esempio n. 2
0
 public FieldImplementation(FieldReferenceStep referenceStep, System.Reflection.FieldInfo fieldInfo)
 {
     this.referenceStep           = referenceStep;
     this.fieldInfo               = fieldInfo;
     this.isResolved              = PlatformTypeHelper.GetFieldType(this.fieldInfo) != null;
     this.serializationVisibility = new DelayedInstance <DesignerSerializationVisibility>(() => PlatformTypeHelper.GetSerializationVisibility(this.PlatformTypes, this.fieldInfo));
     this.defaultValue            = new DelayedInstance <KeyValuePair <bool, object> >(() => {
         Type fieldType = PlatformTypeHelper.GetFieldType(this.fieldInfo);
         if (fieldType == null)
         {
             return(new KeyValuePair <bool, object>(false, null));
         }
         return(PlatformTypeHelper.GetDefaultValue(this.PlatformTypes, this.fieldInfo, fieldType));
     });
 }
Esempio n. 3
0
 public DelayedInstance(DelayedInstance <T> .Instantiate instantiate)
 {
     this.instantiate = instantiate;
 }