public static BlogMLReader Create(IBlogMLProvider provider) { if (provider == null) throw new ArgumentNullException("provider", "provider cannot be null"); return new BlogMLReader(provider); }
/// <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; }
/// <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); }
/// <summary> /// Initializes a new instance of the <see cref="BlogMLReader" /> class. /// </summary> private BlogMLReader(IBlogMLProvider provider) { this.provider = provider; }