Пример #1
0
 private void WritePropertyGet(StructuralProperty property)
 {
     _("get");
     using (_builder.IndentBraced)
     {
         _("return {0};", property.FieldName);
     }
 }
Пример #2
0
        private void Write(StructuralProperty property)
        {
            WriteDeclaration(property);

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

                WritePropertySet(property);
            }
        }
Пример #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);
         }
     }
 }
Пример #4
0
 public static StructuralProperty AsConcreteStructuralProperty(OdcmProperty odcmProperty)
 {
     return(odcmProperty.IsCollection
         ? StructuralCollectionProperty.ForConcrete(odcmProperty)
         : StructuralProperty.ForConcrete(odcmProperty));
 }