public IList CreateNamespaces(Federation aFed) { string author = ""; FileSystemStore store = new FileSystemStore(); NamespaceManager manager = aFed.RegisterNamespace(store, Namespace); manager.WriteTopic(NamespaceManager.DefinitionTopicLocalName, ""); manager.SetTopicPropertyValue(NamespaceManager.DefinitionTopicLocalName, "Contact", Contact, false, author); manager.SetTopicPropertyValue(NamespaceManager.DefinitionTopicLocalName, "Title", Title, false, author); string defaultImportedNamespaces = System.Configuration.ConfigurationManager.AppSettings["DefaultImportedNamespaces"]; if (defaultImportedNamespaces != null) { manager.SetTopicPropertyValue(NamespaceManager.DefinitionTopicLocalName, "Import", defaultImportedNamespaces, false, author); } // whoever is last should write a new version manager.SetTopicPropertyValue(NamespaceManager.DefinitionTopicLocalName, "Description", NamespaceDescription, true, author); ArrayList answer = new ArrayList(); answer.Add(Namespace); return ArrayList.ReadOnly(answer); }
public void LoadNamespaces(Federation aFed) { FileSystemStore store = new FileSystemStore(); aFed.RegisterNamespace(store, Namespace); }
public IList CreateNamespaces(Federation aFed) { string author = ""; FileSystemStore store = new FileSystemStore(); // If no one has set the Root, we should set it to the default value. If we don't, // then the default is the web application directory, which isn't right. // It won't hurt if someone has already set, since in that case DefaultedRoot is the // same as just Root. SetParameter(c_root, DefaultedRoot); NamespaceManager manager = aFed.RegisterNamespace(store, Namespace, _parameters); manager.WriteTopic(NamespaceManager.DefinitionTopicLocalName, ""); manager.SetTopicPropertyValue(NamespaceManager.DefinitionTopicLocalName, "Contact", Contact, false, author); manager.SetTopicPropertyValue(NamespaceManager.DefinitionTopicLocalName, "Title", Title, false, author); string defaultImportedNamespaces = aFed.Configuration.DefaultImportedNamespaces; if (defaultImportedNamespaces != null) { manager.SetTopicPropertyValue(NamespaceManager.DefinitionTopicLocalName, "Import", defaultImportedNamespaces, false, author); } // whoever is last should write a new version manager.SetTopicPropertyValue(NamespaceManager.DefinitionTopicLocalName, "Description", NamespaceDescription, true, author); ArrayList answer = new ArrayList(); answer.Add(Namespace); return ArrayList.ReadOnly(answer); }