Beispiel #1
0
 /// <summary>
 /// Removes the first occurrence of a specific RsdService from this RssServiceCollection.
 /// </summary>
 /// <param name="value">
 /// The RsdService value to remove from this RssServiceCollection.
 /// </param>
 public virtual void Remove(RsdService value)
 {
     this.List.Remove(value);
 }
        public RsdRoot GetRsd()
        {
            // TODO: NLS - Make the default API configurable through SiteConfig
            SiteConfig siteConfig = SiteConfig.GetSiteConfig();
            RsdApiCollection apiCollection = new RsdApiCollection();

            RsdRoot rsd = new RsdRoot();
            RsdService dasBlogService = new RsdService();
            dasBlogService.HomePageLink = SiteUtilities.GetBaseUrl(siteConfig);

            RsdApi metaWeblog    = new RsdApi();
            metaWeblog.Name      = "MetaWeblog";
            metaWeblog.Preferred = ( siteConfig.PreferredBloggingAPI == metaWeblog.Name );
            metaWeblog.ApiLink   = SiteUtilities.GetBloggerUrl(siteConfig);
            metaWeblog.BlogID    = dasBlogService.HomePageLink;
            apiCollection.Add(metaWeblog);

            RsdApi blogger    = new RsdApi();
            blogger.Name      = "Blogger";
            blogger.Preferred = ( siteConfig.PreferredBloggingAPI == blogger.Name );
            blogger.ApiLink   = SiteUtilities.GetBloggerUrl(siteConfig);
            blogger.BlogID    = dasBlogService.HomePageLink;
            apiCollection.Add(blogger);

            RsdApi moveableType    = new RsdApi();
            moveableType.Name      = "Moveable Type";
            moveableType.Preferred = ( siteConfig.PreferredBloggingAPI == moveableType.Name );
            moveableType.ApiLink   = SiteUtilities.GetBloggerUrl( siteConfig );
            moveableType.BlogID    = dasBlogService.HomePageLink;
            apiCollection.Add( moveableType );

            dasBlogService.RsdApiCollection = apiCollection;
            rsd.Services.Add(dasBlogService);

            return rsd;
        }
Beispiel #3
0
 /// <summary>
 /// Return the zero-based index of the first occurrence of a specific value
 /// in this RssServiceCollection
 /// </summary>
 /// <param name="value">
 /// The RsdService value to locate in the RssServiceCollection.
 /// </param>
 /// <returns>
 /// The zero-based index of the first occurrence of the _ELEMENT value if found;
 /// -1 otherwise.
 /// </returns>
 public virtual int IndexOf(RsdService value)
 {
     return(this.List.IndexOf(value));
 }
Beispiel #4
0
 /// <summary>
 /// Inserts an element into the RssServiceCollection at the specified index
 /// </summary>
 /// <param name="index">
 /// The index at which the RsdService is to be inserted.
 /// </param>
 /// <param name="value">
 /// The RsdService to insert.
 /// </param>
 public virtual void Insert(int index, RsdService value)
 {
     this.List.Insert(index, value);
 }
Beispiel #5
0
 /// <summary>
 /// Adds an instance of type RsdService to the end of this RssServiceCollection.
 /// </summary>
 /// <param name="value">
 /// The RsdService to be added to the end of this RssServiceCollection.
 /// </param>
 public virtual void Add(RsdService value)
 {
     this.List.Add(value);
 }
Beispiel #6
0
 /// <summary>
 /// Determines whether a specfic RsdService value is in this RssServiceCollection.
 /// </summary>
 /// <param name="value">
 /// The RsdService value to locate in this RssServiceCollection.
 /// </param>
 /// <returns>
 /// true if value is found in this RssServiceCollection;
 /// false otherwise.
 /// </returns>
 public virtual bool Contains(RsdService value)
 {
     return(this.List.Contains(value));
 }
Beispiel #7
0
 /// <summary>
 /// Inserts an element into the RssServiceCollection at the specified index
 /// </summary>
 /// <param name="index">
 /// The index at which the RsdService is to be inserted.
 /// </param>
 /// <param name="value">
 /// The RsdService to insert.
 /// </param>
 public virtual void Insert(int index, RsdService value)
 {
     this.List.Insert(index, value);
 }
Beispiel #8
0
 /// <summary>
 /// Removes the first occurrence of a specific RsdService from this RssServiceCollection.
 /// </summary>
 /// <param name="value">
 /// The RsdService value to remove from this RssServiceCollection.
 /// </param>
 public virtual void Remove(RsdService value)
 {
     this.List.Remove(value);
 }
Beispiel #9
0
 /// <summary>
 /// Return the zero-based index of the first occurrence of a specific value
 /// in this RssServiceCollection
 /// </summary>
 /// <param name="value">
 /// The RsdService value to locate in the RssServiceCollection.
 /// </param>
 /// <returns>
 /// The zero-based index of the first occurrence of the _ELEMENT value if found;
 /// -1 otherwise.
 /// </returns>
 public virtual int IndexOf(RsdService value)
 {
     return this.List.IndexOf(value);
 }
Beispiel #10
0
 /// <summary>
 /// Determines whether a specfic RsdService value is in this RssServiceCollection.
 /// </summary>
 /// <param name="value">
 /// The RsdService value to locate in this RssServiceCollection.
 /// </param>
 /// <returns>
 /// true if value is found in this RssServiceCollection;
 /// false otherwise.
 /// </returns>
 public virtual bool Contains(RsdService value)
 {
     return this.List.Contains(value);
 }
Beispiel #11
0
 /// <summary>
 /// Adds an instance of type RsdService to the end of this RssServiceCollection.
 /// </summary>
 /// <param name="value">
 /// The RsdService to be added to the end of this RssServiceCollection.
 /// </param>
 public virtual void Add(RsdService value)
 {
     this.List.Add(value);
 }
Beispiel #12
0
 /// <summary>
 /// Adds the elements of an array to the end of this RssServiceCollection.
 /// </summary>
 /// <param name="items">
 /// The array whose elements are to be added to the end of this RssServiceCollection.
 /// </param>
 public virtual void AddRange(RsdService[] items)
 {
     foreach (RsdService item in items)
     {
         this.List.Add(item);
     }
 }
Beispiel #13
0
 /// <summary>
 /// Initializes a new instance of the RssServiceCollection class, containing elements
 /// copied from an array.
 /// </summary>
 /// <param name="items">
 /// The array whose elements are to be added to the new RssServiceCollection.
 /// </param>
 public RssServiceCollection(RsdService[] items)
 {
     this.AddRange(items);
 }