示例#1
0
 public Database(string type, string path, string canonicalPath, LibCoreProperties props)
 {
     this.SetState(0x10);
     this._databaseType  = type;
     this._path          = path;
     this._canonicalPath = canonicalPath;
     this.UrlProperties  = props;
     if (this._databaseType == "res:")
     {
         this.FilesInAssembly = true;
         this._filesReadOnly  = true;
     }
     this.logger = new Logger(this);
     this._shutdownOnNoConnection = this.UrlProperties.IsPropertyTrue("shutdown");
     this.lobManager = new LobManager(this);
 }
        private static async Task RunOptionAsync(Options options)
        {
            try
            {
                ConsoleExtensions.DisplayInfoMessage("Sending request...");

                Result <LobManager> managerResult   = LobManager.Create(options);
                Result <None>       provisionResult = await managerResult.Value.ProvisionResourcesAsync();

                var result = Result.Combine(managerResult, provisionResult);

                if (result.HasError())
                {
                    throw new InvalidOperationException(managerResult.Error);
                }

                ConsoleExtensions.DisplaySuccessMessage("Done!");
            }
            catch (Exception ex)
            {
                var t = ex.Message;
            }
        }