Esempio n. 1
0
 private void WritePropertyGet(StructuralProperty property)
 {
     _("get");
     using (_builder.IndentBraced)
     {
         _("return {0};", property.FieldName);
     }
 }
Esempio n. 2
0
        private void Write(StructuralProperty property)
        {
            WriteDeclaration(property);

            using (_builder.IndentBraced)
            {
                WritePropertyGet(property);

                WritePropertySet(property);
            }
        }
Esempio n. 3
0
 private void WritePropertySet(StructuralProperty property)
 {
     _("set");
     using (_builder.IndentBraced)
     {
         _("if (value != {0})", property.FieldName);
         using (_builder.IndentBraced)
         {
             _("{0} = value;", property.FieldName);
             _("OnPropertyChanged(\"{0}\");", property.ModelName);
         }
     }
 }
Esempio n. 4
0
        private void Write(StructuralProperty property)
        {
            WriteDeclaration(property);

            using (_builder.IndentBraced)
            {
                WritePropertyGet(property);

                WritePropertySet(property);
            }
        }
Esempio n. 5
0
 private void WritePropertyGet(StructuralProperty property)
 {
     _("get");
     using (_builder.IndentBraced)
     {
         _("return {0};", property.FieldName);
     }
 }
Esempio n. 6
0
 private void WritePropertySet(StructuralProperty property)
 {
     _("set");
     using (_builder.IndentBraced)
     {
         _("if (value != {0})", property.FieldName);
         using (_builder.IndentBraced)
         {
             _("{0} = value;", property.FieldName);
             _("OnPropertyChanged(\"{0}\");", property.ModelName);
         }
     }
 }
Esempio n. 7
0
 public static StructuralProperty AsConcreteStructuralProperty(OdcmProperty odcmProperty)
 {
     return(odcmProperty.IsCollection
         ? StructuralCollectionProperty.ForConcrete(odcmProperty)
         : StructuralProperty.ForConcrete(odcmProperty));
 }