Exemplo n.º 1
0
        internal TestNamespace(string name, NamespaceProviderParameterCollection parameters,
            params TestTopic[] topics)
        {
            _name = name;
            _topics = topics;

            if (parameters != null)
            {
                foreach (NamespaceProviderParameter parameter in parameters)
                {
                    _parameters.Add(parameter);
                }
            }
        }
Exemplo n.º 2
0
        // Constructors

        internal NamespaceManager(Federation federation, ContentProviderBase contentProvider,
            string ns, NamespaceProviderParameterCollection parameters)
        {
            _federation = federation;
            _contentProviderChain = contentProvider;
            _namespace = ns;

            if (parameters != null)
            {
                foreach (NamespaceProviderParameter parameter in parameters)
                {
                    _parameters.Add(parameter);
                }
            }

            _contentProviderChain.Initialize(this); 
        }
Exemplo n.º 3
0
        /// <summary>
        /// Register the given content store in the federation.
        /// </summary>
        public NamespaceManager RegisterNamespace(ContentProviderBase contentStore, string ns, 
            NamespaceProviderParameterCollection parameters)
        {
            // These are the default providers that every namespace gets. Later we might
            // want to make these configurable
            ContentProviderBase providerChain = new BuiltinTopicsProvider(contentStore); 
            providerChain = new ParsingProvider(providerChain);
            
            NamespaceManager namespaceManager = new NamespaceManager(this, providerChain, ns, parameters);
            _namespaceToNamespaceManagerMap[namespaceManager.Namespace] = namespaceManager;

            return namespaceManager;
        }
Exemplo n.º 4
0
 internal static NamespaceManager CreateMockStore(Federation federation, string ns, 
     MockSetupOptions options, NamespaceProviderParameterCollection parameters)
 {
     MockContentStore store = new MockContentStore(options);
     return federation.RegisterNamespace(store, ns, parameters);
 }
Exemplo n.º 5
0
 internal static NamespaceManager CreateMockStore(Federation federation, string ns,
     NamespaceProviderParameterCollection parameters)
 {
     return CreateMockStore(federation, ns, MockSetupOptions.Default, parameters); 
 }