static ModelEnumerationItemNodeAdapter()
 {
     ObservableObject.IPropertyAdapterFactory <ModelEnumerationItemNodeAdapter> Factory = ObservableObject.GetPropertyAdapterFactory <ModelEnumerationItemNodeAdapter>();
     ModelEnumerationItemNodeAdapter.internalValueAdapter = Factory.Create(
         nameof(ModelEnumerationItemNodeAdapter.InternalValue),
         instance => ModelNodeBaseAdapter.GetAdapter(instance, instance.enumerationItem.Value)
         );
     ModelEnumerationItemNodeAdapter.modelAdapter = Factory.Create(
         nameof(ModelEnumerationItemNodeAdapter.Model),
         instance => instance.InternalValue.Model
         );
     ModelEnumerationItemNodeAdapter.nameAdapter = Factory.Create(
         nameof(ModelEnumerationItemNodeAdapter.Name),
         instance => instance.enumerationItem.Name
         );
     ModelEnumerationItemNodeAdapter.typenameAdapter = Factory.Create(
         nameof(ModelEnumerationItemNodeAdapter.Typename),
         instance => instance.InternalValue.Typename
         );
     ModelEnumerationItemNodeAdapter.valueAdapter = Factory.Create(
         nameof(ModelEnumerationItemNodeAdapter.Value),
         instance => instance.InternalValue.Value
         );
     ModelEnumerationItemNodeAdapter.hasValueAdapter = Factory.Create(
         nameof(ModelEnumerationItemNodeAdapter.HasValue),
         instance => instance.InternalValue.HasValue
         );
     ModelEnumerationItemNodeAdapter.childrenAdapter = Factory.Create(
         nameof(ModelEnumerationItemNodeAdapter.Children),
         instance => instance.InternalValue.Children
         );
 }
 static ModelComplexNodeAdapter()
 {
     ObservableObject.IPropertyAdapterFactory <ModelComplexNodeAdapter> Factory = ObservableObject.GetPropertyAdapterFactory <ModelComplexNodeAdapter>();
     ModelComplexNodeAdapter.typenameAdapter = Factory.Create(
         nameof(ModelComplexNodeAdapter.Typename),
         instance => instance.model.Type.Name
         );
     ModelComplexNodeAdapter.childrenAdapter = Factory.Create(
         nameof(ModelComplexNodeAdapter.Children),
         instance => instance.model.Properties,
         (instance, value) => ModelNodeBaseAdapter.GetAdapter(instance, value)
         );
 }
Esempio n. 3
0
        static ModelPropertyNodeAdapter()
        {
            IPropertyAdapterFactory <ModelPropertyNodeAdapter> Factory = ObservableObject.GetPropertyAdapterFactory <ModelPropertyNodeAdapter>();

            ModelPropertyNodeAdapter.internalValueAdapter = Factory.Create(
                nameof(ModelPropertyNodeAdapter.InternalValue),
                instance => ModelNodeBaseAdapter.GetAdapter(instance, instance.propertyNode.Value)
                );
            ModelPropertyNodeAdapter.modelAdapter = Factory.Create(
                nameof(ModelPropertyNodeAdapter.Model),
                instance => instance.InternalValue.Model
                );
            ModelPropertyNodeAdapter.nameAdapter = Factory.Create(
                nameof(ModelPropertyNodeAdapter.Name),
                instance => instance.propertyNode.Name
                );
            ModelPropertyNodeAdapter.typenameAdapter = Factory.Create(
                nameof(ModelPropertyNodeAdapter.Typename),
                instance => instance.InternalValue.Typename
                );
            ModelPropertyNodeAdapter.valueAdapter = Factory.Create(
                nameof(ModelPropertyNodeAdapter.Value),
                instance => instance.InternalValue.Value
                );
            ModelPropertyNodeAdapter.hasValueAdapter = Factory.Create(
                nameof(ModelPropertyNodeAdapter.HasValue),
                instance => instance.InternalValue.HasValue
                );
            ModelPropertyNodeAdapter.supportsValidationAdapter = Factory.Create(
                nameof(ModelPropertyNodeAdapter.SupportsValidation),
                instance => instance.propertyNode.SupportsValidation
                );
            ModelPropertyNodeAdapter.validationSeverityAdapter = Factory.Create(
                nameof(ModelPropertyNodeAdapter.ValidationSeverity),
                instance => instance.propertyNode.ValidationSeverity
                );
            ModelPropertyNodeAdapter.validationResultsAdapter = Factory.Create(
                nameof(ModelPropertyNodeAdapter.ValidationResults),
                instance => instance.propertyNode.ValidationResults,
                (instance, message) => message
                );
            ModelPropertyNodeAdapter.childrenAdapter = Factory.Create(
                nameof(ModelPropertyNodeAdapter.Children),
                instance => instance.InternalValue.Children
                );
        }
Esempio n. 4
0
        static ModelInfoAdapter()
        {
            IPropertyAdapterFactory <ModelInfoAdapter> Factory = ObservableObject.GetPropertyAdapterFactory <ModelInfoAdapter>();

            ModelInfoAdapter.typeNameAdapter = Factory.Create(
                nameof(ModelInfoAdapter.TypeName),
                instance => instance.Model.Root.Type != null ? instance.Model.Root.Type.Name : "null"
                );
            ModelInfoAdapter.rootAdapter = Factory.Create(
                nameof(ModelInfoAdapter.Root),
                instance => ModelNodeBaseAdapter.GetAdapter(instance, instance.Model.Root)
                );
            ModelInfoAdapter.nameAdapter = Factory.Create(
                nameof(ModelInfoAdapter.Name),
                instance => instance.Model.Name,
                (instance, value) => instance.Model.Name = value
                );
        }