本文整理汇总了C#中ApplicationModulesManager类的典型用法代码示例。如果您正苦于以下问题:C# ApplicationModulesManager类的具体用法?C# ApplicationModulesManager怎么用?C# ApplicationModulesManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ApplicationModulesManager类属于命名空间,在下文中一共展示了ApplicationModulesManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Setup
public override void Setup(ApplicationModulesManager moduleManager) {
base.Setup(moduleManager);
if (Application != null) {
Application.UserDifferencesLoaded += OnUserDifferencesLoaded;
Application.CreateCustomUserModelDifferenceStore += ApplicationOnCreateCustomUserModelDifferenceStore;
}
}
示例2: Setup
public override void Setup(ApplicationModulesManager moduleManager) {
base.Setup(moduleManager);
var businessClassesList = GetAdditionalClasses(moduleManager);
WCTypesInfo.Instance.Register(businessClassesList);
if (Application == null || GetPath() == null)
return;
Application.SettingUp += ApplicationOnSettingUp;
if (FullConnectionString != null) {
var xpoMultiDataStoreProxy = new SqlMultiDataStoreProxy(FullConnectionString, GetReflectionDictionary());
using (var dataLayer = new SimpleDataLayer(xpoMultiDataStoreProxy)) {
using (var session = new Session(dataLayer)) {
using (var unitOfWork = new UnitOfWork(session.DataLayer)) {
RunUpdaters(session);
AddDynamicModules(moduleManager, unitOfWork);
}
}
}
} else {
var assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(assembly => assembly.ManifestModule.ScopeName.EndsWith(CompileEngine.XpandExtension));
foreach (var assembly1 in assemblies) {
moduleManager.AddModule(assembly1.GetTypes().Where(type => typeof(ModuleBase).IsAssignableFrom(type)).Single());
}
}
Application.SetupComplete += ApplicationOnSetupComplete;
}
示例3: AddLayers
void AddLayers(ModelApplicationBase modelApplication, ApplicationModulesManager applicationModulesManager, PathInfo pathInfo) {
var resourceModelCollector = new ResourceModelCollector();
var dictionary = resourceModelCollector.Collect(applicationModulesManager.Modules.Select(@base => @base.GetType().Assembly), null);
AddLayersCore(dictionary.Where(pair => !PredicateLastLayer(pair, pathInfo)), modelApplication);
ModelApplicationBase lastLayer = modelApplication.CreatorInstance.CreateModelApplication();
modelApplication.AddLayer(lastLayer);
}
示例4: Setup
public override void Setup(ApplicationModulesManager moduleManager) {
base.Setup(moduleManager);
if (RuntimeMode && !_comparerIsLock && typeof(IUser).IsAssignableFrom(Application.Security.UserType)) {
ObjectAccessComparerBase.SetCurrentComparer(new MemberLevelObjectAccessComparer());
_comparerIsLock = true;
}
}
示例5: Setup
public override void Setup(ApplicationModulesManager moduleManager)
{
base.Setup(moduleManager);
var registrator = new ValidationRulesRegistrator(moduleManager);
registrator.RegisterRule(typeof(RuleRequiredForAtLeast1Property), typeof(IRuleRequiredForAtLeast1PropertyProperties));
registrator.RegisterRule(typeof(RuleFromIPropertyValueValidator), typeof(IRuleFromIPropertyValueValidatorProperties));
}
示例6: Setup
public override void Setup(ApplicationModulesManager moduleManager) {
base.Setup(moduleManager);
if (RuntimeMode) {
AddToAdditionalExportedTypes("Xpand.Persistent.BaseImpl.ImportExport");
Core.TypesInfo.Instance.RegisterTypes(GetAdditionalClasses(moduleManager));
}
}
示例7: Setup
public override void Setup(ApplicationModulesManager moduleManager) {
base.Setup(moduleManager);
if (RuntimeMode){
_authentication = new Authentication();
_authentication.Attach(this);
}
}
示例8: Setup
public override void Setup(ApplicationModulesManager moduleManager) {
base.Setup(moduleManager);
if (Application != null) {
Application.LoggedOff += Application_LoggedOff;
Application.Disposed += Application_Disposed;
}
}
示例9: GetModelApplication
ModelApplicationBase GetModelApplication(ApplicationModulesManager applicationModulesManager, PathInfo pathInfo, FileModelStore fileModelStore) {
var modelApplication = ModelApplicationHelper.CreateModel(XafTypesInfo.Instance, applicationModulesManager.DomainComponents, applicationModulesManager.Modules, applicationModulesManager.ControllersManager, Type.EmptyTypes, fileModelStore.GetAspects(), null, null);
AddLayers(modelApplication, applicationModulesManager, pathInfo);
ModelApplicationBase lastLayer = modelApplication.CreatorInstance.CreateModelApplication();
fileModelStore.Load(lastLayer);
ModelApplicationHelper.AddLayer(modelApplication, lastLayer);
return modelApplication;
}
示例10: Setup
public override void Setup(ApplicationModulesManager moduleManager) {
base.Setup(moduleManager);
// if (RuntimeMode)
if (Application != null) {
Application.SetupComplete += new EventHandler<EventArgs>(Application_SetupComplete);
Application.CreateCustomCollectionSource += new EventHandler<CreateCustomCollectionSourceEventArgs>(Application_CreateCustomCollectionSource);
}
}
示例11: Setup
public override void Setup(ApplicationModulesManager moduleManager) {
base.Setup(moduleManager);
var modelDifferenceBaseModule = (ModelDifferenceBaseModule)moduleManager.Modules.Where(
mbase => typeof(ModelDifferenceBaseModule).IsAssignableFrom(mbase.GetType())).SingleOrDefault();
if (modelDifferenceBaseModule != null)
modelDifferenceBaseModule.CreateCustomModelDifferenceStore += ModelDifferenceBaseModuleOnCreateCustomModelDifferenceStore;
}
示例12: Setup
public override void Setup(ApplicationModulesManager moduleManager) {
base.Setup(moduleManager);
if (RuntimeMode) {
AddToAdditionalExportedTypes(new[] { "Xpand.Persistent.BaseImpl.SequenceObject" });
SequenceObjectType = AdditionalExportedTypes.Single(type => type.FullName == "Xpand.Persistent.BaseImpl.SequenceObject");
InitializeSequenceGenerator();
}
}
示例13: Setup
public override void Setup(ApplicationModulesManager moduleManager) {
base.Setup(moduleManager);
if (Application != null) {
var winApplication = Application as WinApplication;
if (winApplication != null) winApplication.HandleException();
Application.LoggedOff += Application_LoggedOff;
Application.Disposed += Application_Disposed;
}
}
示例14: Setup
public override void Setup(ApplicationModulesManager moduleManager) {
base.Setup(moduleManager);
if (Application == null)
return;
if (RuntimeMode) {
AddToAdditionalExportedTypes("Xpand.Persistent.BaseImpl.JobScheduler");
Application.LoggedOn += ApplicationOnLoggedOn;
}
}
示例15: Setup
public override void Setup(ApplicationModulesManager moduleManager) {
base.Setup(moduleManager);
if (Application != null) {
Application.LoggingOn += (sender, args) => {
if (ModelsLoaded.HasValue)
LoadModels(!ModelsLoaded.Value);
ModelsLoaded = true;
};
}
}