Пример #1
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); 
        }
Пример #2
0
        // Fields

        // Constructors

        public BuiltinTopicsProvider(ContentProviderBase next)
            : base(next)
        {
        }
Пример #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;
        }
Пример #4
0
 /// <summary>
 /// Register the given content store in the federation.
 /// </summary>
 public NamespaceManager RegisterNamespace(ContentProviderBase contentStore, string ns)
 {
     return RegisterNamespace(contentStore, ns, null); 
 }
Пример #5
0
 internal ParsingProvider(ContentProviderBase next)
     : base(next)
 {
 }