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


C# ITypeInfo.FindMember方法代码示例

本文整理汇总了C#中ITypeInfo.FindMember方法的典型用法代码示例。如果您正苦于以下问题:C# ITypeInfo.FindMember方法的具体用法?C# ITypeInfo.FindMember怎么用?C# ITypeInfo.FindMember使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ITypeInfo的用法示例。


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

示例1: removeUnlimitedSizeMembers

 private ICollection<string> removeUnlimitedSizeMembers(IEnumerable<string> properties, ITypeInfo typeInfo)
 {
     return (from property in properties
             let attribute = typeInfo.FindMember(property).FindAttribute<SizeAttribute>()
             where (attribute != null && attribute.Size != SizeAttribute.Unlimited) || attribute == null
             select property).ToList();
 }
开发者ID:akingunes,项目名称:eXpand,代码行数:7,代码来源:FilterController.cs

示例2: AddRoles

 void AddRoles(IModelRegistration modelRegistration, ITypeInfo userTypeInfo, ISecurityUserWithRoles securityUserWithRoles,
                      IObjectSpace objectSpace) {
     var roles = (XPBaseCollection) userTypeInfo.FindMember("Roles").GetValue(securityUserWithRoles);
     var roleType = modelRegistration.RoleModelClass.TypeInfo.Type;
     var criteria = CriteriaOperator.Parse(modelRegistration.RoleCriteria);
     var objects = objectSpace.GetObjects(roleType, criteria);
     roles.BaseAddRange(objects);
 }
开发者ID:noxe,项目名称:eXpand,代码行数:8,代码来源:Parameters.cs

示例3: UpdateVersionInXaml

 void UpdateVersionInXaml(ITypeInfo objectsTypeInfo, Version oldVersion, Version newVersion) {
     if (objectsTypeInfo != null && objectsTypeInfo.IsPersistent) {
         IMemberInfo xamlMemberInfo = objectsTypeInfo.FindMember(XamlPropertyName);
         if (xamlMemberInfo == null) {
             throw new MemberNotFoundException(objectsTypeInfo.Type, XamlPropertyName);
         }
         foreach (object objectToUpdate in ObjectSpace.GetObjects(objectsTypeInfo.Type)) {
             var currentXaml = xamlMemberInfo.GetValue(objectToUpdate) as string;
             string updatedXaml = WorkflowDefinitionsUpdater.UpdateDxAssembliesVersions(currentXaml, oldVersion, newVersion);
             xamlMemberInfo.SetValue(objectToUpdate, updatedXaml);
             ObjectSpace.SetModified(objectToUpdate);
         }
         if (ObjectSpace.IsModified) {
             ObjectSpace.CommitChanges();
         }
     }
 }
开发者ID:aries544,项目名称:eXpand,代码行数:17,代码来源:XpandWorkflowDefinitionsUpdater.cs

示例4: CreateDefaultFilterControlRepositoryItem

 public static RepositoryItem CreateDefaultFilterControlRepositoryItem(this DataColumnInfoFilterColumn column, DevExpress.XtraGrid.Views.Grid.GridView gridView, ITypeInfo objectTypeInfo, RepositoryEditorsFactory repositoryFactory) {
     if (gridView != null && column != null) {
         if (column.Parent == null || !column.Parent.IsList) {
             IMemberInfo memberInfo = objectTypeInfo.FindMember(column.FullName);
             if (memberInfo != null) {
                 GridColumn gridColumn = gridView.Columns[memberInfo.BindingName];
                 if (gridColumn != null) {
                     return new GridFilterColumn(gridColumn).ColumnEditor;
                 }
             }
         }
         if (repositoryFactory != null && column.ColumnType != null) {
             return repositoryFactory.CreateStandaloneRepositoryItem(column.ColumnType);
         }
     }
     return null;
 }
开发者ID:aries544,项目名称:eXpand,代码行数:17,代码来源:GridListEditorBase.cs

示例5: GetObjectKeyCriteria

 CriteriaOperator GetObjectKeyCriteria(ITypeInfo typeInfo, IEnumerable<XElement> xElements)
 {
     string criteria = "";
     var parameters=new List<object>();
     foreach (var xElement in xElements) {
         var name = xElement.GetAttributeValue("name");
         parameters.Add(XpandReflectionHelper.ChangeType(xElement.Value, typeInfo.FindMember(name).MemberType));
         criteria += name + "=? AND ";
     }
     return CriteriaOperator.Parse(criteria.TrimEnd("AND ".ToCharArray()),parameters.ToArray());
 }
开发者ID:gvilas,项目名称:eXpand,代码行数:11,代码来源:ImportEngine.cs

示例6: TypeMatch

 bool TypeMatch(ITypeInfo typeInfo, FilterProviderBase provider1) {
     return ((!typeInfo.IsInterface && provider1.ObjectType == null || provider1.ObjectType == typeInfo.Type) && typeInfo.FindMember(provider1.FilterMemberName) == null && typeInfo.IsPersistent) && !ModelSystemTablesNodesGenerator.SystemTables.Contains(typeInfo.Name);
 }
开发者ID:noxe,项目名称:eXpand,代码行数:3,代码来源:FilterDataStoreModuleBase.cs

示例7: MemberInfo

 static IMemberInfo MemberInfo(ITypeInfo roleTypeInfo, SecurityOperationsAttribute operationsAttribute) {
     return roleTypeInfo.FindMember(operationsAttribute.OperationProviderProperty);
 }
开发者ID:dimajanzen,项目名称:eXpand,代码行数:3,代码来源:SecuritySystemRoleExtensions.cs

示例8: HandleErrorComplex

 private void HandleErrorComplex(XElement objectElement, ITypeInfo typeInfo, Action action) {
     var memberInfo = typeInfo.FindMember(objectElement.Parent.GetAttributeValue("name"));
     if (memberInfo != null) {
         action.Invoke();
     } else {
         HandleError(objectElement, FailReason.PropertyNotFound);
     }
 }
开发者ID:aries544,项目名称:eXpand,代码行数:8,代码来源:ImportEngine.cs

示例9: AssignValue

 Action<string> AssignValue(object createObject, JobDataMap jobDataMap, ITypeInfo typeInfo) {
     return s => {
         var memberInfo = typeInfo.FindMember(s);
         if (memberInfo != null) memberInfo.SetValue(createObject, jobDataMap[s]);
     };
 }
开发者ID:aries544,项目名称:eXpand,代码行数:6,代码来源:_JobDataMapController.cs


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