public void Startup() { DatabaseSubSchemaManager updater = new DatabaseSubSchemaManager(UserProfileDataManagement_SubSchema.SUBSCHEMA_NAME); updater.AddDirectory(UserProfileDataManagement_SubSchema.SubSchemaScriptDirectory); int curVersionMajor; int curVersionMinor; if (!updater.UpdateSubSchema(out curVersionMajor, out curVersionMinor) || curVersionMajor != UserProfileDataManagement_SubSchema.EXPECTED_SCHEMA_VERSION_MAJOR || curVersionMinor != UserProfileDataManagement_SubSchema.EXPECTED_SCHEMA_VERSION_MINOR) { throw new IllegalCallException(string.Format( "Unable to update the UserProfileDataManagement's subschema version to expected version {0}.{1}", UserProfileDataManagement_SubSchema.EXPECTED_SCHEMA_VERSION_MAJOR, UserProfileDataManagement_SubSchema.EXPECTED_SCHEMA_VERSION_MINOR)); } }
public void Startup() { DatabaseSubSchemaManager updater = new DatabaseSubSchemaManager(ClientManager_SubSchema.SUBSCHEMA_NAME); updater.AddDirectory(ClientManager_SubSchema.SubSchemaScriptDirectory); int curVersionMajor; int curVersionMinor; if (!updater.UpdateSubSchema(out curVersionMajor, out curVersionMinor) || curVersionMajor != ClientManager_SubSchema.EXPECTED_SCHEMA_VERSION_MAJOR || curVersionMinor != ClientManager_SubSchema.EXPECTED_SCHEMA_VERSION_MINOR) { throw new IllegalCallException(string.Format( "Unable to update the ClientManager's subschema version to expected version {0}.{1}", ClientManager_SubSchema.EXPECTED_SCHEMA_VERSION_MAJOR, ClientManager_SubSchema.EXPECTED_SCHEMA_VERSION_MINOR)); } IDictionary <string, MPClientMetadata> attachedClients = ReadAttachedClientsFromDB(); lock (_syncObj) _attachedClients = attachedClients; _controlPoint.AttachedClientSystemIds = attachedClients.Keys; _controlPoint.Start(); }