Exemplo n.º 1
0
        public static BlogMLReader Create(IBlogMLProvider provider)
        {
            if (provider == null)
                throw new ArgumentNullException("provider", "provider cannot be null");

            return new BlogMLReader(provider);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Constructs an instance of the BlogMlWriter for the specified blogId.
        /// </summary>
        private BlogMLWriter(IBlogMLProvider provider, IBlogMLContext context)
        {
            this.provider = provider;
            this.blogId = context.BlogId;
            this.conversionStrategy = provider.IdConversion;

            if (this.conversionStrategy == null)
                this.conversionStrategy = IdConversionStrategy.Empty;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Creates an instance of the BlogMl Writer.
        /// </summary>
        /// <param name="provider">The provider.</param>
        public static BlogMLWriter Create(IBlogMLProvider provider)
        {
            if (provider == null)
                throw new ArgumentNullException("provider", "provider cannot be null");

            IBlogMLContext context = provider.GetBlogMlContext();
            if (context == null)
                throw new InvalidOperationException("The BlogMl provider did not set the context.");

            return new BlogMLWriter(provider, context);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlogMLReader" /> class.
 /// </summary>
 private BlogMLReader(IBlogMLProvider provider)
 {
     this.provider = provider;
 }