string GetModelAdaptorFolder() { string appSetting = ConfigurationManager.AppSettings["ModelAdaptorPath"]; if (Directory.Exists(appSetting)) { return(appSetting); } if (InterfaceBuilder.RuntimeMode && !XpandModuleBase.IsHosted && !Debugger.IsAttached && appSetting != null) { var userAppDataPath = System.Windows.Forms.Application.UserAppDataPath; var xafApplication = ApplicationHelper.Instance.Application; if (xafApplication != null) { var methodInfo = xafApplication.GetType().GetMethod("GetFileLocation", BindingFlags.Instance | BindingFlags.NonPublic); var typeInfo = XafTypesInfo.Instance.FindTypeInfo("DevExpress.ExpressApp.Win.FileLocation"); methodInfo = methodInfo.MakeGenericMethod(typeInfo.Type); var values = Enum.GetValues(typeInfo.Type); var value = values.GetValue(1); var invoke = methodInfo.Invoke(xafApplication, new[] { value, "ModelAdaptorPath" }); return((int)invoke != (int)value? userAppDataPath: PathHelper.GetApplicationFolder()); } } var folder = InterfaceBuilder.RuntimeMode? AppDomain.CurrentDomain.SetupInformation.ApplicationBase: InterfaceBuilder.GetTempDirectory(); return(Path.Combine(folder, "ModelAdaptor")); }
public static string GeneratedDisplayNameCode(string arg3) { var interfaceBuilder = new InterfaceBuilder(); return(string.Format(@"[{0}(""{1}"")]", interfaceBuilder.TypeToString(typeof(ModelDisplayNameAttribute)), arg3)); }
protected virtual void ExtendingModelInterfaces(InterfaceBuilder builder, Assembly assembly, ModelInterfaceExtenders extenders) { }