A collection of elements of type RsdApi
Inheritance: System.Collections.CollectionBase
Exemplo n.º 1
0
 /// <summary>
 /// Adds the elements of another RsdApiCollection to the end of this RsdApiCollection.
 /// </summary>
 /// <param name="items">
 /// The RsdApiCollection whose elements are to be added to the end of this RsdApiCollection.
 /// </param>
 public virtual void AddRange(RsdApiCollection items)
 {
     foreach (RsdApi item in items)
     {
         this.List.Add(item);
     }
 }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 public Enumerator(RsdApiCollection collection)
 {
     this.wrapped = ((System.Collections.CollectionBase)collection).GetEnumerator();
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the RsdApiCollection class, containing elements
 /// copied from another instance of RsdApiCollection
 /// </summary>
 /// <param name="items">
 /// The RsdApiCollection whose elements are to be added to the new RsdApiCollection.
 /// </param>
 public RsdApiCollection(RsdApiCollection items)
 {
     this.AddRange(items);
 }
Exemplo n.º 5
0
 public Enumerator(RsdApiCollection collection)
 {
     this.wrapped = ((System.Collections.CollectionBase)collection).GetEnumerator();
 }
Exemplo n.º 6
0
 /// <summary>
 /// Adds the elements of another RsdApiCollection to the end of this RsdApiCollection.
 /// </summary>
 /// <param name="items">
 /// The RsdApiCollection whose elements are to be added to the end of this RsdApiCollection.
 /// </param>
 public virtual void AddRange(RsdApiCollection items)
 {
     foreach (RsdApi item in items)
     {
         this.List.Add(item);
     }
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the RsdApiCollection class, containing elements
 /// copied from another instance of RsdApiCollection
 /// </summary>
 /// <param name="items">
 /// The RsdApiCollection whose elements are to be added to the new RsdApiCollection.
 /// </param>
 public RsdApiCollection(RsdApiCollection items)
 {
     this.AddRange(items);
 }