本文整理汇总了C#中ITypesInfo类的典型用法代码示例。如果您正苦于以下问题:C# ITypesInfo类的具体用法?C# ITypesInfo怎么用?C# ITypesInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ITypesInfo类属于命名空间,在下文中一共展示了ITypesInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CriteriaObjectReplacer
public CriteriaObjectReplacer(ITypesInfo typesInfo)
{
if (typesInfo == null)
throw new ArgumentNullException("typesInfo");
this.typesInfo = typesInfo;
}
示例2: NHObjectSpaceProvider
public NHObjectSpaceProvider(ITypesInfo typesInfo, IPersistenceManager persistenceManager)
{
Guard.ArgumentNotNull(typesInfo, "typesInfo");
Guard.ArgumentNotNull(persistenceManager, "persistenceManager");
this.typesInfo = typesInfo;
this.persistenceManager = persistenceManager;
}
示例3: NHNestedObjectSpace
internal NHNestedObjectSpace(ITypesInfo typesInfo, IEntityStore entityStore, IPersistenceManager persistenceManager,
Dictionary<object, ObjectSpaceInstanceInfo> instances, NHObjectSpace parentObjectSpace) :
base(typesInfo, entityStore, persistenceManager, instances, null)
{
this.parentObjectSpace = parentObjectSpace;
}
示例4: CustomizeTypesInfo
public override void CustomizeTypesInfo(ITypesInfo typesInfo) {
base.CustomizeTypesInfo(typesInfo);
if (!RuntimeMode) {
CreateDesignTimeCollection(typesInfo, typeof(UserModelDifferenceObject), "Users");
CreateDesignTimeCollection(typesInfo, typeof(RoleModelDifferenceObject), "Roles");
}
}
示例5: CustomizeTypesInfo
public override void CustomizeTypesInfo(ITypesInfo typesInfo) {
base.CustomizeTypesInfo(typesInfo);
if (!RuntimeMode) {
CreateDesignTimeCollection(typesInfo, typeof(SendEmailJobDetailDataMap), "Users");
CreateDesignTimeCollection(typesInfo, typeof(SendEmailJobDetailDataMap), "Roles");
}
}
示例6: UpdateLayoutManager
void UpdateLayoutManager(ITypesInfo typesInfo) {
if (!(LayoutManager is ILayoutManager)) {
var typeInfo = ReflectionHelper.FindTypeDescendants(typesInfo.FindTypeInfo(typeof(ILayoutManager))).FirstOrDefault();
if (typeInfo != null)
this.SetPropertyInfoBackingFieldValue(view => view.LayoutManager, this, ReflectionHelper.CreateObject(typeInfo.Type));
}
}
示例7: CreateMembers
void CreateMembers(ITypesInfo typesInfo, Type optionsType, Type persistentType) {
ITypeInfo typeInfo = typesInfo.FindTypeInfo(ReflectionHelper.GetType(persistentType.Name));
IEnumerable<PropertyInfo> propertyInfos = optionsType.GetProperties().Where(info => info.GetSetMethod() != null).Where(propertyInfo => typeInfo.FindMember(propertyInfo.Name) == null);
foreach (PropertyInfo propertyInfo in propertyInfos) {
OnCreateMember(typeInfo, propertyInfo.Name, propertyInfo.PropertyType);
}
}
示例8: CustomizeTypesInfo
public override void CustomizeTypesInfo(ITypesInfo typesInfo) {
base.CustomizeTypesInfo(typesInfo);
var memberInfos = typesInfo.PersistentTypes.SelectMany(info => info.OwnMembers);
foreach (var memberInfo in memberInfos) {
HandleCustomAttribute(memberInfo, typesInfo);
}
}
示例9: CustomizeTypesInfo
public override void CustomizeTypesInfo(ITypesInfo typesInfo) {
base.CustomizeTypesInfo(typesInfo);
new FullTextContainsFunction().Register();
if (Application != null && Application.Security != null) {
CreatePessimisticLockingField(typesInfo);
}
}
示例10: CreateModulesManager
ApplicationModulesManager CreateModulesManager(XafApplication application, string configFileName, string assembliesPath, ITypesInfo typesInfo) {
if (!string.IsNullOrEmpty(configFileName)) {
bool isWebApplicationModel = string.Compare(Path.GetFileNameWithoutExtension(configFileName), "web", true) == 0;
if (string.IsNullOrEmpty(assembliesPath)) {
assembliesPath = Path.GetDirectoryName(configFileName);
if (isWebApplicationModel) {
assembliesPath = Path.Combine(assembliesPath + "", "Bin");
}
}
}
ReflectionHelper.AddResolvePath(assembliesPath);
try {
var result = new ApplicationModulesManager(new ControllersManager(), assembliesPath);
if (application != null) {
foreach (ModuleBase module in application.Modules) {
result.AddModule(module);
}
result.Security = application.Security;
}
if (!string.IsNullOrEmpty(configFileName)) {
result.AddModuleFromAssemblies(GetModulesFromConfig(application));
}
if (typesInfo is TypesInfo)
XpandModuleBase.Dictiorary = ((TypesInfo)typesInfo).Source.XPDictionary;
result.Load(typesInfo);
return result;
} finally {
XpandModuleBase.Dictiorary = XafTypesInfo.XpoTypeInfoSource.XPDictionary;
ReflectionHelper.RemoveResolvePath(assembliesPath);
}
}
示例11: CreateDesignTimeCollection
protected void CreateDesignTimeCollection(ITypesInfo typesInfo, Type classType, string propertyName) {
XPClassInfo info = XafTypesInfo.XpoTypeInfoSource.XPDictionary.GetClassInfo(classType);
if (info.FindMember(propertyName) == null) {
info.CreateMember(propertyName, typeof(XPCollection), true);
typesInfo.RefreshInfo(classType);
}
}
示例12: CreateMember
void CreateMember(ITypesInfo typesInfo, IRoleTypeProvider roleTypeProvider, SecurityOperationsAttribute attribute) {
var roleTypeInfo = typesInfo.FindTypeInfo(roleTypeProvider.RoleType);
if (roleTypeInfo.FindMember(attribute.OperationProviderProperty) == null) {
var memberInfo = roleTypeInfo.CreateMember(attribute.OperationProviderProperty, typeof(SecurityOperationsEnum));
memberInfo.AddAttribute(new RuleRequiredFieldAttribute());
}
}
示例13: CustomizeTypesInfo
public override void CustomizeTypesInfo(ITypesInfo typesInfo) {
base.CustomizeTypesInfo(typesInfo);
if (Application != null) {
typesInfo.FindTypeInfo(typeof(ShowInAnalysisPermission)).FindMember("ControllerType").AddAttribute(new VisibleInDetailViewAttribute(false));
typesInfo.FindTypeInfo(typeof(PivotSettingsPermission)).FindMember("ControllerType").AddAttribute(new VisibleInDetailViewAttribute(false));
}
}
示例14: CreateObjectSpaceCore
protected override IObjectSpace CreateObjectSpaceCore(UnitOfWork unitOfWork, ITypesInfo typesInfo) {
var objectSpace = new XpandObjectSpace(new XpandUnitOfWork(unitOfWork.DataLayer), typesInfo) {
AsyncServerModeSourceResolveSession = AsyncServerModeSourceResolveSession,
AsyncServerModeSourceDismissSession = AsyncServerModeSourceDismissSession
};
return objectSpace;
}
示例15: CreateApplicationModulesManager
public ApplicationModulesManager CreateApplicationModulesManager(XafApplication application, string configFileName, string assembliesPath, ITypesInfo typesInfo) {
if (!string.IsNullOrEmpty(configFileName)) {
bool isWebApplicationModel =
String.Compare(Path.GetFileNameWithoutExtension(configFileName), "web", StringComparison.OrdinalIgnoreCase) == 0;
if (string.IsNullOrEmpty(assembliesPath)) {
assembliesPath = Path.GetDirectoryName(configFileName);
if (isWebApplicationModel) {
assembliesPath = Path.Combine(assembliesPath + "", "Bin");
}
}
}
ReflectionHelper.AddResolvePath(assembliesPath);
try {
var result = new ApplicationModulesManager(new ControllersManager(), assembliesPath);
foreach (ModuleBase module in application.Modules) {
result.AddModule(module);
}
result.Security = application.Security;
if (GetModulesFromConfig(application) != null) {
result.AddModuleFromAssemblies(GetModulesFromConfig(application));
}
return result;
} finally {
ReflectionHelper.RemoveResolvePath(assembliesPath);
}
}