本文整理汇总了C#中Schema.GetObjects方法的典型用法代码示例。如果您正苦于以下问题:C# Schema.GetObjects方法的具体用法?C# Schema.GetObjects怎么用?C# Schema.GetObjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Schema
的用法示例。
在下文中一共展示了Schema.GetObjects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
public static void Start()
{
JsonConvert.DefaultSettings = () => new JsonSerializerSettings
{
Converters = new List<JsonConverter> { new JsonImageConverter() }
};
////if (!System.Diagnostics.Debugger.IsAttached)
////{
//// Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
//// AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
////}
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("ru");
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ru");
Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencyDecimalSeparator = ".";
Thread.CurrentThread.CurrentUICulture.NumberFormat.CurrencyDecimalSeparator = ".";
Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator = ".";
Thread.CurrentThread.CurrentUICulture.NumberFormat.NumberDecimalSeparator = ".";
Random = new Random();
UserID = Guid.Parse("10000001-28E0-4E14-B18C-E8185351E5C7");
Mef = new Mef();
var mefCatalog = new AggregateCatalog();
mefCatalog.Catalogs.Add(new AssemblyCatalog(typeof(App).Assembly));
if (!File.Exists(AppDomain.CurrentDomain.BaseDirectory + @"bin\buhtacore.dll"))
throw new Exception("AppDomain.CurrentDomain.BaseDirectory работает неправильно.");
mefCatalog.Catalogs.Add(new DirectoryCatalog(AppDomain.CurrentDomain.BaseDirectory+"bin", "company.dll"));
//Debug.Print("AppDomain.CurrentDomain.BaseDirectory", AppDomain.CurrentDomain.BaseDirectory);
////mefCatalog.Catalogs.Add(new DirectoryCatalog(AppDomain.CurrentDomain.BaseDirectory, "nopCommerce.dll"));
CompositionContainer mefContainer = new CompositionContainer(mefCatalog);
mefContainer.ComposeParts(Mef);
//Schema = new Schema("ps-web", null, "BuhtaSchema", "sa1", "sonyk"); // работа
Schema = new Schema(@"5.19.239.191", 52538, "BuhtaSchema", "sa1", "sonyk"); // работа
var sqlDatabases = Schema.GetObjects<SchemaDatabase>();
if (sqlDatabases.Count == 0)
throw new Exception("Нет баз данных SQL в схеме '" + Schema.SchemaSqlDatabase + "'");
else
Schema.SqlDB = sqlDatabases[0];
SchemaBaseRole.LoadRoles();
SchemaVirtualTable.LoadVirtualTables();
//Schema = new Schema("5.19.239.191", 64123, "Buhta", "kostia", "sonyk"); // дома
}