当前位置: 首页>>代码示例>>C#>>正文


C# XPClassInfo类代码示例

本文整理汇总了C#中XPClassInfo的典型用法代码示例。如果您正苦于以下问题:C# XPClassInfo类的具体用法?C# XPClassInfo怎么用?C# XPClassInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XPClassInfo类属于命名空间,在下文中一共展示了XPClassInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddTableNames

 void AddTableNames(XPClassInfo xpClassInfo, string key) {
     List<string> list = _tables[key];
     list.Add(xpClassInfo.TableName);
     foreach (var tableName in GetIntermediateTableNames(xpClassInfo).Where(tableName => !list.Contains(tableName))) {
         list.Add(tableName);
     }
 }
开发者ID:akingunes,项目名称:eXpand,代码行数:7,代码来源:DataStoreManager.cs

示例2: GetDictionary

 public ReflectionDictionary GetDictionary(XPClassInfo xpClassInfo) {
     string key = GetKey(xpClassInfo);
     var reflectionDictionary = GetDictionary(key);
     if (xpClassInfo.IsPersistent)
         AddTableNames(xpClassInfo, key);
     return reflectionDictionary;
 }
开发者ID:testexpand,项目名称:eXpand,代码行数:7,代码来源:DataStoreManager.cs

示例3: updateObjectType

 //        private void createObjectTypeColumn(XPClassInfo xpClassInfo, UnitOfWork unitOfWork)
 //        {
 //            unitOfWork.CreateObjectTypeRecords(xpClassInfo);
 //            var newObject = xpClassInfo.CreateNewObject(unitOfWork);
 //            unitOfWork.CommitChanges();
 //            unitOfWork.Delete(newObject);
 //            unitOfWork.CommitChanges();
 //        }
 private void updateObjectType(UnitOfWork unitOfWork, XPClassInfo xpClassInfo, XPClassInfo mergedXPClassInfo, IDbCommand command)
 {
     var propertyName = XPObject.Fields.ObjectType.PropertyName;
     command.CommandText = "UPDATE [" + getTableName(mergedXPClassInfo) + "] SET " + propertyName + "=" + unitOfWork.GetObjectType(xpClassInfo).Oid +
                           " WHERE " + propertyName + " IS NULL OR " + propertyName + "=" +unitOfWork.GetObjectType(mergedXPClassInfo).Oid;
     command.ExecuteNonQuery();
 }
开发者ID:cevious,项目名称:eXpand,代码行数:15,代码来源:XpoObjectMerger.cs

示例4: DCPropertyInfos

 IEnumerable<DCPropertyInfo> DCPropertyInfos(XPClassInfo classInfo) {
     if (classInfo != null){
         var xpandCalcMemberInfos = classInfo.OwnMembers.OfType<XpandCustomMemberInfo>();
         return xpandCalcMemberInfos.Select(info => DcPropertyInfo(classInfo, info));
     }
     return Enumerable.Empty<DCPropertyInfo>();
 }
开发者ID:aries544,项目名称:eXpand,代码行数:7,代码来源:XpandXpoTypeInfoSource.cs

示例5: getTableName

 string getTableName(XPClassInfo mergedXPClassInfo) {
     string tableName = mergedXPClassInfo.TableName;
     while (mergedXPClassInfo.BaseClass != null && mergedXPClassInfo.BaseClass.IsPersistent) {
         mergedXPClassInfo = mergedXPClassInfo.BaseClass;
         tableName = mergedXPClassInfo.TableName;
     }
     return tableName;
 }
开发者ID:aries544,项目名称:eXpand,代码行数:8,代码来源:XpoObjectMerger.cs

示例6: Synchonize

 protected virtual void Synchonize(object persistentPivotOption, Type type, XPClassInfo classInfo) {
     var gridOptionInstances = GetGridOptionInstance(type);
     foreach (var gridOptionInstance in gridOptionInstances) {
         var propertyInfos = gridOptionInstance.GetType().GetProperties().Where(propertyInfo => propertyInfo.GetSetMethod() != null);
         foreach (var propertyInfo in propertyInfos) {
             classInfo.GetMember(propertyInfo.Name).SetValue(persistentPivotOption, propertyInfo.GetValue(gridOptionInstance, null));
         }
     }
 }
开发者ID:aries544,项目名称:eXpand,代码行数:9,代码来源:PivotOptionsController.cs

示例7: DCPropertyInfo

 public DCPropertyInfo(string name, Type propertyType, XPClassInfo declaringType, bool canRead, bool canWrite, XpandCustomMemberInfo xpandCustomMemberInfo) {
     _nameCore = name;
     _propertyTypeCore = propertyType;
     _declaringTypeCore = declaringType;
     _canReadCore = canRead;
     _canWriteCore = canWrite;
     _xpandCustomMemberInfo = xpandCustomMemberInfo;
     _attributesCore.AddRange(xpandCustomMemberInfo.Attributes);
 }
开发者ID:aries544,项目名称:eXpand,代码行数:9,代码来源:XpandXpoTypeInfoSource.cs

示例8: GetNextSequence

 long GetNextSequence(XPClassInfo classInfo, string preFix) {
     if (classInfo == null)
         throw new ArgumentNullException("classInfo");
     var objectByKey = _explicitUnitOfWork.GetObjectByKey(_sequenceObjectType, preFix + classInfo.FullName, true);
     _sequence = objectByKey != null ? (ISequenceObject)objectByKey : CreateSequenceObject(preFix + classInfo.FullName, _explicitUnitOfWork);
     long nextId = _sequence.NextSequence;
     _sequence.NextSequence++;
     _explicitUnitOfWork.FlushChanges();
     return nextId;
 }
开发者ID:gvilas,项目名称:eXpand,代码行数:10,代码来源:SequenceGenerator.cs

示例9: GetMemberInfo

 static XpandCustomMemberInfo GetMemberInfo(IModelRuntimeMember modelMember, XPClassInfo xpClassInfo) {
     if (modelMember is IModelRuntimeCalculatedMember)
         return xpClassInfo.CreateCalculabeMember(modelMember.Name, modelMember.Type,
                                               new Attribute[] { new PersistentAliasAttribute(((IModelRuntimeCalculatedMember)modelMember).AliasExpression) });
     if (modelMember is IModelRuntimeOrphanedColection) {
         var modelRuntimeOrphanedColection = ((IModelRuntimeOrphanedColection)modelMember);
         return xpClassInfo.CreateCollection(modelMember.Name, modelRuntimeOrphanedColection.CollectionType.TypeInfo.Type,
                                             modelRuntimeOrphanedColection.Criteria);
     }
     return xpClassInfo.CreateCustomMember(modelMember.Name, modelMember.Type, modelMember is IModelRuntimeNonPersistentMember);
 }
开发者ID:kevin3274,项目名称:eXpand,代码行数:11,代码来源:RuntimeMemberBuilder.cs

示例10: GetMemberInfo

 static XpandCustomMemberInfo GetMemberInfo(IModelRuntimeMember modelMember, XPClassInfo xpClassInfo) {
     var calculatedMember = modelMember as IModelRuntimeCalculatedMember;
     if (calculatedMember != null)
         return xpClassInfo.CreateCalculabeMember(calculatedMember.Name, calculatedMember.Type, calculatedMember.AliasExpression);
     var member = modelMember as IModelRuntimeOrphanedColection;
     if (member != null) {
         var modelRuntimeOrphanedColection = member;
         return xpClassInfo.CreateCollection(member.Name, modelRuntimeOrphanedColection.CollectionType.TypeInfo.Type,
                                             modelRuntimeOrphanedColection.Criteria);
     }
     return xpClassInfo.CreateCustomMember(modelMember.Name, modelMember.Type, modelMember is IModelRuntimeNonPersistentMember);
 }
开发者ID:dimajanzen,项目名称:eXpand,代码行数:12,代码来源:RuntimeMemberBuilder.cs

示例11: GetSelectFilterCriteria

 /// <contentfrom cref="ISecurityRule.GetSelectFilterCriteria" />
 public bool GetSelectFilterCriteria(DevExpress.Xpo.SecurityContext context, XPClassInfo classInfo, out CriteriaOperator criteria)
 {
     List<CriteriaOperator> subList = new List<CriteriaOperator>();
     CriteriaOperator subCriteria;
     foreach (ISecurityRule rule in rules)
         if (rule.GetSelectFilterCriteria(context, classInfo, out subCriteria))
             subList.Add(subCriteria);
     if (subList.Count == 0)
         criteria = null;
     else if (subList.Count == 1)
         criteria = subList[0];
     else
         criteria = new GroupOperator(GroupOperatorType.And, subList.ToArray());
     return subList.Count > 0;
 }
开发者ID:LSTANCZYK,项目名称:devexpress_xaf_aurum,代码行数:16,代码来源:ComplexRule.cs

示例12: GetSelectMemberExpression

 /// <contentfrom cref="ISecurityRule.GetSelectMemberExpression" />
 public bool GetSelectMemberExpression(DevExpress.Xpo.SecurityContext context, XPClassInfo classInfo, XPMemberInfo memberInfo, out CriteriaOperator expression)
 {
     CriteriaOperator subExpression;
     expression = null;
     foreach (ISecurityRule rule in rules)
         if (rule.GetSelectMemberExpression(context, classInfo, memberInfo, out subExpression))
         {
             if (ReferenceEquals(expression, null))
                 expression = subExpression;
             else if (!CriteriaOperator.CriterionEquals(expression, subExpression))
             {
                 expression = new OperandValue(null);
                 return true;
             }
         }
     return !ReferenceEquals(expression, null);
 }
开发者ID:LSTANCZYK,项目名称:devexpress_xaf_aurum,代码行数:18,代码来源:ComplexRule.cs

示例13: MapManyToMany

 void MapManyToMany(XPDictionary outputDictionary, XPDictionary inputDictionary, XPClassInfo classInfo) {
     foreach (var memberInfo in ManyToManyMemberInfos(classInfo)) {
         var initialDataAttribute = (InitialDataAttribute)memberInfo.FindAttributeInfo(typeof(InitialDataAttribute));
         var className = initialDataAttribute.DataProviderTableName;
         if (initialDataAttribute.DataProvider && inputDictionary.QueryClassInfo(null, className) == null) {
             CreateIntermediateClassInfo(outputDictionary, inputDictionary, className, initialDataAttribute, memberInfo);
         }
     }
 }
开发者ID:dimajanzen,项目名称:eXpand,代码行数:9,代码来源:ImportData.cs

示例14: InputObjectClassInfo

        public InputObjectClassInfo(XPDictionary dictionary, string className, XPClassInfo outputClassInfo)
            : base(dictionary, null, className, GetAttributes()) {
            Guard.ArgumentNotNull(outputClassInfo, "outputClassInfo");
            _outputClassInfo = outputClassInfo;

        }
开发者ID:dimajanzen,项目名称:eXpand,代码行数:6,代码来源:ImportData.cs

示例15: CreateAllOwnMembers

 void CreateAllOwnMembers(XPClassInfo outputClassInfo, XPClassInfo inputClassInfo) {
     foreach (var memberInfo in MemberInfos(outputClassInfo)) {
         if (memberInfo.HasAttribute(typeof(InitialDataAttribute))) {
             CreateMemberFromAttribute(inputClassInfo, memberInfo);
         } else {
             CreateMemberCore(inputClassInfo, memberInfo.Name, memberInfo);
         }
     }
 }
开发者ID:dimajanzen,项目名称:eXpand,代码行数:9,代码来源:ImportData.cs


注:本文中的XPClassInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。