本文整理汇总了C#中ObjectClass类的典型用法代码示例。如果您正苦于以下问题:C# ObjectClass类的具体用法?C# ObjectClass怎么用?C# ObjectClass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectClass类属于命名空间,在下文中一共展示了ObjectClass类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ObjectClassViewModel
public ObjectClassViewModel(
IViewModelDependencies appCtx, IZetboxContext dataCtx, ViewModel parent,
ObjectClass cls)
: base(appCtx, dataCtx, parent, cls)
{
_class = cls;
}
示例2: InheritanceAssociationName
public static string InheritanceAssociationName(ObjectClass parentClass, ObjectClass childClass)
{
if (parentClass == null) { throw new ArgumentNullException("parentClass"); }
if (childClass == null) { throw new ArgumentNullException("childClass"); }
return InheritanceAssociationName(parentClass.Name, childClass.Name);
}
示例3: MakeArgs
public static object[] MakeArgs(IZetboxContext ctx, ObjectClass cls, NameValueCollection templateSettings)
{
if (ctx == null) { throw new ArgumentNullException("ctx"); }
if (cls == null) { throw new ArgumentNullException("cls"); }
if (templateSettings == null) { throw new ArgumentNullException("templateSettings"); }
string extraSuffix = templateSettings["extrasuffix"];
string interfaceName = cls.Name;
string implementationName = cls.Name + extraSuffix + Zetbox.API.Helper.ImplementationSuffix;
string schemaName = cls.Module.SchemaName;
string tableName = cls.TableName;
string qualifiedImplementationName = GetAssemblyQualifiedProxy(cls, templateSettings);
bool isAbstract = cls.IsAbstract;
List<Property> properties = cls.Properties.ToList();
List<ObjectClass> subClasses = cls.SubClasses.ToList();
bool needsRightTable = Templates.ObjectClasses.Template.NeedsRightsTable(cls);
string qualifiedRightsClassName =
cls.Module.Namespace + "."
+ Construct.SecurityRulesClassName(cls) + extraSuffix + Zetbox.API.Helper.ImplementationSuffix
+ ", Zetbox.Objects." + extraSuffix + Zetbox.API.Helper.ImplementationSuffix;
bool needsConcurrency = cls.ImplementsIChangedBy(true);
return new object[] { interfaceName, implementationName, schemaName, tableName, qualifiedImplementationName, isAbstract, properties, subClasses, needsRightTable, needsConcurrency, qualifiedRightsClassName, cls.GetTableMapping() };
}
示例4: ModelMslEntityTypeMapping
public ModelMslEntityTypeMapping(Arebis.CodeGeneration.IGenerationHost _host, IZetboxContext ctx, ObjectClass cls)
: base(_host)
{
this.ctx = ctx;
this.cls = cls;
}
示例5: ApplyObjectClassTemplate
protected virtual void ApplyObjectClassTemplate(ObjectClass cls)
{
this.CallTemplate("Mappings.ObjectClassHbm",
new object[] { ctx }
.Concat(ObjectClassHbm.MakeArgs(ctx, cls, new NameValueCollection() { { "extrasuffix", extraSuffix } }))
.ToArray());
}
示例6: Call
public static void Call(Arebis.CodeGeneration.IGenerationHost host, IZetboxContext ctx, ObjectClass cls, string ifName, string implName)
{
if (host == null) { throw new ArgumentNullException("host"); }
string propertyDescriptorName = host.Settings["propertydescriptorname"];
host.CallTemplate("ObjectClasses.CustomTypeDescriptor", ctx, cls, ifName, implName, propertyDescriptorName);
}
示例7: ObjectClassViewModel
public ObjectClassViewModel(IViewModelDependencies appCtx,
IZetboxContext dataCtx, ViewModel parent, ObjectClass cls)
: base(appCtx, dataCtx, parent, cls)
{
_cls = cls;
cls.PropertyChanged += ModulePropertyChanged;
}
示例8: AttachToContextTemplate
public AttachToContextTemplate(Arebis.CodeGeneration.IGenerationHost _host, IZetboxContext ctx, ObjectClass cls)
: base(_host)
{
this.ctx = ctx;
this.cls = cls;
}
示例9: RenderObjectAs
public override void RenderObjectAs(ObjectContext context, ObjectClass objectClass)
{
if(!string.IsNullOrEmpty(objectClass.Atts["Table"]))
RenderTableObjectAs(context, objectClass);
else if(!string.IsNullOrEmpty(objectClass.Atts["Proc"]))
RenderProcObjectAs(context, objectClass);
}
示例10: FilterListViewModel
public FilterListViewModel(IViewModelDependencies appCtx, IZetboxContext dataCtx, ViewModel parent, ObjectClass type, IFulltextSupport fulltextSupport = null)
: base(appCtx, dataCtx, parent)
{
if (type == null) throw new ArgumentNullException("type");
_type = type;
_fulltextSupport = fulltextSupport;
}
示例11: SelectAndParents
protected static IEnumerable<ObjectClass> SelectAndParents(ObjectClass cls)
{
yield return cls;
while (cls.BaseObjectClass != null)
{
cls = cls.BaseObjectClass;
yield return cls;
}
}
示例12: SecurityRulesClass
public SecurityRulesClass(Arebis.CodeGeneration.IGenerationHost _host, IZetboxContext ctx, ObjectClass cls, string assocName, string targetRoleName, string referencedImplementation)
: base(_host)
{
this.ctx = ctx;
this.cls = cls;
this.assocName = assocName;
this.targetRoleName = targetRoleName;
this.referencedImplementation = referencedImplementation;
}
示例13: CustomTypeDescriptor
public CustomTypeDescriptor(Arebis.CodeGeneration.IGenerationHost _host, IZetboxContext ctx, ObjectClass cls, string ifName, string implName, string propertyDescriptorName)
: base(_host)
{
this.ctx = ctx;
this.cls = cls;
this.ifName = ifName;
this.implName = implName;
this.propertyDescriptorName = propertyDescriptorName;
}
示例14: Call
public static void Call(IGenerationHost host, IZetboxContext ctx, ObjectClass cls)
{
if (host == null) { throw new ArgumentNullException("host"); }
if (ctx == null) { throw new ArgumentNullException("ctx"); }
if (cls == null) { throw new ArgumentNullException("cls"); }
host.CallTemplate("ObjectClasses.SecurityRulesClass", ctx, cls,
Construct.SecurityRulesFKName(cls),
Construct.SecurityRulesClassName(cls),
Construct.SecurityRulesClassName(cls) + host.Settings["extrasuffix"] + Zetbox.API.Helper.ImplementationSuffix);
}
示例15: GetWrapperTypeReference
public static string GetWrapperTypeReference(ObjectClass cls, NameValueCollection templateSettings)
{
if (cls == null) { throw new ArgumentNullException("cls"); }
if (templateSettings == null) { throw new ArgumentNullException("templateSettings"); }
string extraSuffix = templateSettings["extrasuffix"];
return cls.Module.Namespace + "."
+ cls.Name + extraSuffix + Zetbox.API.Helper.ImplementationSuffix;
}