public string GetCatalog(string name, out long cacheTimeStamp, out long clientCacheTimeStamp, out bool cacheChanged) { cacheTimeStamp = _serverProcess.ServerSession.Server.CacheTimeStamp; Schema.Catalog catalog = new Schema.Catalog(); catalog.IncludeDependencies(_serverProcess.CatalogDeviceSession, _serverProcess.Catalog, _serverProcess.Catalog[name], EmitMode.ForRemote); #if LOGCACHEEVENTS FServerProcess.ServerSession.Server.LogMessage(String.Format("Getting catalog for data type '{0}'.", AName)); #endif cacheChanged = true; string[] requiredObjects = _session.Server.CatalogCaches.GetRequiredObjects(_session, catalog, cacheTimeStamp, out clientCacheTimeStamp); if (requiredObjects.Length > 0) { string catalogString = new D4TextEmitter(EmitMode.ForRemote).Emit(catalog.EmitStatement(_serverProcess.CatalogDeviceSession, EmitMode.ForRemote, requiredObjects)); return(catalogString); } return(String.Empty); }
/// <summary> Emits the creation script for the catalog and returns it as a string. </summary> public string ScriptCatalog(CatalogDeviceSession session) { return(new D4TextEmitter().Emit(_catalog.EmitStatement(session, EmitMode.ForCopy, false))); }