public SyndicationPerson(string email, string name, string uri)
 {
     this.extensions = new ExtensibleSyndicationObject();
     this.name = name;
     this.email = email;
     this.uri = uri;
 }
 public ResourceCollectionInfo(TextSyndicationContent title, Uri link, IEnumerable<CategoriesDocument> categories, IEnumerable<string> accepts)
 {
     this.extensions = new ExtensibleSyndicationObject();
     if (title == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("title");
     }
     if (link == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("link");
     }
     this.title = title;
     this.link = link;
     if (categories != null)
     {
         this.categories = new NullNotAllowedCollection<CategoriesDocument>();
         foreach (CategoriesDocument document in categories)
         {
             this.categories.Add(document);
         }
     }
     if (accepts != null)
     {
         this.accepts = new NullNotAllowedCollection<string>();
         foreach (string str in accepts)
         {
             this.accepts.Add(str);
         }
     }
 }
コード例 #3
0
ファイル: SyndicationItem.cs プロジェクト: naricc/runtime
        protected SyndicationItem(SyndicationItem source)
        {
            if (source is null)
            {
                throw new ArgumentNullException(nameof(source));
            }

            _extensions      = source._extensions.Clone();
            _authors         = FeedUtils.ClonePersons(source._authors);
            _categories      = FeedUtils.CloneCategories(source._categories);
            Content          = (source.Content != null) ? source.Content.Clone() : null;
            _contributors    = FeedUtils.ClonePersons(source._contributors);
            Copyright        = FeedUtils.CloneTextContent(source.Copyright);
            Id               = source.Id;
            _lastUpdatedTime = source._lastUpdatedTime;
            _links           = FeedUtils.CloneLinks(source._links);
            _publishDate     = source._publishDate;
            if (source.SourceFeed != null)
            {
                SourceFeed       = source.SourceFeed.Clone(false);
                SourceFeed.Items = new Collection <SyndicationItem>();
            }
            Summary = FeedUtils.CloneTextContent(source.Summary);
            BaseUri = source.BaseUri;
            Title   = FeedUtils.CloneTextContent(source.Title);
        }
 public SyndicationCategory(string name, string scheme, string label)
 {
     this.extensions = new ExtensibleSyndicationObject();
     this.name = name;
     this.scheme = scheme;
     this.label = label;
 }
コード例 #5
0
 protected SyndicationPerson(SyndicationPerson source)
 {
     if (source == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source");
     }
     this.email = source.email;
     this.name = source.name;
     this.uri = source.uri;
     this.extensions = source.extensions.Clone();
 }
コード例 #6
0
 protected SyndicationCategory(SyndicationCategory source)
 {
     if (source == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source");
     }
     this.label = source.label;
     this.name = source.name;
     this.scheme = source.scheme;
     this.extensions = source.extensions.Clone();
 }
コード例 #7
0
 protected SyndicationPerson(SyndicationPerson source)
 {
     if (source == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source");
     }
     _email      = source._email;
     _name       = source._name;
     _uri        = source._uri;
     _extensions = source._extensions.Clone();
 }
コード例 #8
0
 protected SyndicationCategory(SyndicationCategory source)
 {
     if (source == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(source));
     }
     _label      = source._label;
     _name       = source._name;
     _scheme     = source._scheme;
     _extensions = source._extensions.Clone();
 }
コード例 #9
0
 protected SyndicationCategory(SyndicationCategory source)
 {
     if (source == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source");
     }
     this.label      = source.label;
     this.name       = source.name;
     this.scheme     = source.scheme;
     this.extensions = source.extensions.Clone();
 }
コード例 #10
0
 protected SyndicationCategory(SyndicationCategory source)
 {
     if (source == null)
     {
         throw new ArgumentNullException(nameof(source));
     }
     _label      = source._label;
     _name       = source._name;
     _scheme     = source._scheme;
     _extensions = source._extensions.Clone();
 }
コード例 #11
0
 protected SyndicationPerson(SyndicationPerson source)
 {
     if (source == null)
     {
         throw new ArgumentNullException(nameof(source));
     }
     _email      = source._email;
     _name       = source._name;
     _uri        = source._uri;
     _extensions = source._extensions.Clone();
 }
コード例 #12
0
 protected SyndicationPerson(SyndicationPerson source)
 {
     this.extensions = new ExtensibleSyndicationObject();
     if (source == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source");
     }
     this.email      = source.email;
     this.name       = source.name;
     this.uri        = source.uri;
     this.extensions = source.extensions.Clone();
 }
コード例 #13
0
 public ServiceDocument(IEnumerable <Workspace> workspaces)
 {
     this.extensions = new ExtensibleSyndicationObject();
     if (workspaces != null)
     {
         this.workspaces = new NullNotAllowedCollection <Workspace>();
         foreach (Workspace workspace in workspaces)
         {
             this.workspaces.Add(workspace);
         }
     }
 }
コード例 #14
0
ファイル: SyndicationPerson.cs プロジェクト: naricc/runtime
        protected SyndicationPerson(SyndicationPerson source)
        {
            if (source is null)
            {
                throw new ArgumentNullException(nameof(source));
            }

            Email       = source.Email;
            Name        = source.Name;
            Uri         = source.Uri;
            _extensions = source._extensions.Clone();
        }
コード例 #15
0
ファイル: SyndicationCategory.cs プロジェクト: naricc/runtime
        protected SyndicationCategory(SyndicationCategory source)
        {
            if (source is null)
            {
                throw new ArgumentNullException(nameof(source));
            }

            Label       = source.Label;
            Name        = source.Name;
            Scheme      = source.Scheme;
            _extensions = source._extensions.Clone();
        }
コード例 #16
0
 public Workspace(TextSyndicationContent title, IEnumerable<ResourceCollectionInfo> collections)
 {
     this.extensions = new ExtensibleSyndicationObject();
     this.title = title;
     if (collections != null)
     {
         this.collections = new NullNotAllowedCollection<ResourceCollectionInfo>();
         foreach (ResourceCollectionInfo info in collections)
         {
             this.collections.Add(info);
         }
     }
 }
コード例 #17
0
 public Workspace(TextSyndicationContent title, IEnumerable <ResourceCollectionInfo> collections)
 {
     this.extensions = new ExtensibleSyndicationObject();
     this.title      = title;
     if (collections != null)
     {
         this.collections = new NullNotAllowedCollection <ResourceCollectionInfo>();
         foreach (ResourceCollectionInfo info in collections)
         {
             this.collections.Add(info);
         }
     }
 }
コード例 #18
0
 public SyndicationLink(System.Uri uri, string relationshipType, string title, string mediaType, long length)
 {
     this.extensions = new ExtensibleSyndicationObject();
     if (length < 0L)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("length"));
     }
     this.baseUri          = null;
     this.uri              = uri;
     this.title            = title;
     this.relationshipType = relationshipType;
     this.mediaType        = mediaType;
     this.length           = length;
 }
コード例 #19
0
 public SyndicationLink(System.Uri uri, string relationshipType, string title, string mediaType, long length)
 {
     this.extensions = new ExtensibleSyndicationObject();
     if (length < 0L)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("length"));
     }
     this.baseUri = null;
     this.uri = uri;
     this.title = title;
     this.relationshipType = relationshipType;
     this.mediaType = mediaType;
     this.length = length;
 }
コード例 #20
0
 protected SyndicationLink(SyndicationLink source)
 {
     if (source == null)
     {
         throw new ArgumentNullException(nameof(source));
     }
     _length           = source._length;
     _mediaType        = source._mediaType;
     _relationshipType = source._relationshipType;
     _title            = source._title;
     _baseUri          = source._baseUri;
     _uri        = source._uri;
     _extensions = source._extensions.Clone();
 }
コード例 #21
0
 protected SyndicationLink(SyndicationLink source)
 {
     if (source == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source");
     }
     _length           = source._length;
     _mediaType        = source._mediaType;
     _relationshipType = source._relationshipType;
     _title            = source._title;
     _baseUri          = source._baseUri;
     _uri        = source._uri;
     _extensions = source._extensions.Clone();
 }
コード例 #22
0
 protected SyndicationLink(SyndicationLink source)
 {
     if (source == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source");
     }
     this.length = source.length;
     this.mediaType = source.mediaType;
     this.relationshipType = source.relationshipType;
     this.title = source.title;
     this.baseUri = source.baseUri;
     this.uri = source.uri;
     this.extensions = source.extensions.Clone();
 }
コード例 #23
0
 protected SyndicationLink(SyndicationLink source)
 {
     if (source == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source");
     }
     this.length           = source.length;
     this.mediaType        = source.mediaType;
     this.relationshipType = source.relationshipType;
     this.title            = source.title;
     this.baseUri          = source.baseUri;
     this.uri        = source.uri;
     this.extensions = source.extensions.Clone();
 }
コード例 #24
0
        protected SyndicationLink(SyndicationLink source)
        {
            if (source is null)
            {
                throw new ArgumentNullException(nameof(source));
            }

            _length          = source._length;
            MediaType        = source.MediaType;
            RelationshipType = source.RelationshipType;
            Title            = source.Title;
            BaseUri          = source.BaseUri;
            Uri         = source.Uri;
            _extensions = source._extensions.Clone();
        }
コード例 #25
0
 public SyndicationItem(string title, SyndicationContent content, Uri itemAlternateLink, string id, DateTimeOffset lastUpdatedTime)
 {
     this.extensions = new ExtensibleSyndicationObject();
     if (title != null)
     {
         this.Title = new TextSyndicationContent(title);
     }
     this.content = content;
     if (itemAlternateLink != null)
     {
         this.Links.Add(SyndicationLink.CreateAlternateLink(itemAlternateLink));
     }
     this.id = id;
     this.lastUpdatedTime = lastUpdatedTime;
 }
コード例 #26
0
 public SyndicationFeed(string title, string description, Uri feedAlternateLink, string id, DateTimeOffset lastUpdatedTime, IEnumerable <SyndicationItem> items)
 {
     this.extensions = new ExtensibleSyndicationObject();
     if (title != null)
     {
         this.title = new TextSyndicationContent(title);
     }
     if (description != null)
     {
         this.description = new TextSyndicationContent(description);
     }
     if (feedAlternateLink != null)
     {
         this.Links.Add(SyndicationLink.CreateAlternateLink(feedAlternateLink));
     }
     this.id = id;
     this.lastUpdatedTime = lastUpdatedTime;
     this.items           = items;
 }
コード例 #27
0
ファイル: SyndicationFeed.cs プロジェクト: zhangzdb/corefx
        protected SyndicationFeed(SyndicationFeed source, bool cloneItems)
        {
            if (source == null)
            {
                throw new ArgumentNullException(nameof(source));
            }

            _authors         = FeedUtils.ClonePersons(source._authors);
            _categories      = FeedUtils.CloneCategories(source._categories);
            _contributors    = FeedUtils.ClonePersons(source._contributors);
            _copyright       = FeedUtils.CloneTextContent(source._copyright);
            _description     = FeedUtils.CloneTextContent(source._description);
            _extensions      = source._extensions.Clone();
            _generator       = source._generator;
            _id              = source._id;
            _imageUrl        = source._imageUrl;
            _language        = source._language;
            _lastUpdatedTime = source._lastUpdatedTime;
            _links           = FeedUtils.CloneLinks(source._links);
            _title           = FeedUtils.CloneTextContent(source._title);
            _baseUri         = source._baseUri;
            IList <SyndicationItem> srcList = source._items as IList <SyndicationItem>;

            if (srcList != null)
            {
                Collection <SyndicationItem> tmp = new NullNotAllowedCollection <SyndicationItem>();
                for (int i = 0; i < srcList.Count; ++i)
                {
                    tmp.Add((cloneItems) ? srcList[i].Clone() : srcList[i]);
                }
                _items = tmp;
            }
            else
            {
                if (cloneItems)
                {
                    throw new InvalidOperationException(SR.UnbufferedItemsCannotBeCloned);
                }

                _items = source._items;
            }
        }
コード例 #28
0
        protected SyndicationFeed(SyndicationFeed source, bool cloneItems)
        {
            this.extensions = new ExtensibleSyndicationObject();
            if (source == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source");
            }
            this.authors         = FeedUtils.ClonePersons(source.authors);
            this.categories      = FeedUtils.CloneCategories(source.categories);
            this.contributors    = FeedUtils.ClonePersons(source.contributors);
            this.copyright       = FeedUtils.CloneTextContent(source.copyright);
            this.description     = FeedUtils.CloneTextContent(source.description);
            this.extensions      = source.extensions.Clone();
            this.generator       = source.generator;
            this.id              = source.id;
            this.imageUrl        = source.imageUrl;
            this.language        = source.language;
            this.lastUpdatedTime = source.lastUpdatedTime;
            this.links           = FeedUtils.CloneLinks(source.links);
            this.title           = FeedUtils.CloneTextContent(source.title);
            this.baseUri         = source.baseUri;
            IList <SyndicationItem> items = source.items as IList <SyndicationItem>;

            if (items != null)
            {
                Collection <SyndicationItem> collection = new NullNotAllowedCollection <SyndicationItem>();
                for (int i = 0; i < items.Count; i++)
                {
                    collection.Add(cloneItems ? items[i].Clone() : items[i]);
                }
                this.items = collection;
            }
            else
            {
                if (cloneItems)
                {
                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(System.ServiceModel.SR.GetString("UnbufferedItemsCannotBeCloned")));
                }
                this.items = source.items;
            }
        }
コード例 #29
0
        protected SyndicationFeed(SyndicationFeed source, bool cloneItems)
        {
            if (source == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source");
            }
            this.authors         = FeedUtils.ClonePersons(source.authors);
            this.categories      = FeedUtils.CloneCategories(source.categories);
            this.contributors    = FeedUtils.ClonePersons(source.contributors);
            this.copyright       = FeedUtils.CloneTextContent(source.copyright);
            this.description     = FeedUtils.CloneTextContent(source.description);
            this.extensions      = source.extensions.Clone();
            this.generator       = source.generator;
            this.id              = source.id;
            this.imageUrl        = source.imageUrl;
            this.language        = source.language;
            this.lastUpdatedTime = source.lastUpdatedTime;
            this.links           = FeedUtils.CloneLinks(source.links);
            this.title           = FeedUtils.CloneTextContent(source.title);
            this.baseUri         = source.baseUri;
            IList <SyndicationItem> srcList = source.items as IList <SyndicationItem>;

            if (srcList != null)
            {
                Collection <SyndicationItem> tmp = new NullNotAllowedCollection <SyndicationItem>();
                for (int i = 0; i < srcList.Count; ++i)
                {
                    tmp.Add((cloneItems) ? srcList[i].Clone() : srcList[i]);
                }
                this.items = tmp;
            }
            else
            {
                if (cloneItems)
                {
                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.UnbufferedItemsCannotBeCloned)));
                }
                this.items = source.items;
            }
        }
コード例 #30
0
 ExtensibleSyndicationObject(ExtensibleSyndicationObject source)
 {
     if (source.attributeExtensions != null)
     {
         this.attributeExtensions = new Dictionary <XmlQualifiedName, string>();
         foreach (XmlQualifiedName key in source.attributeExtensions.Keys)
         {
             this.attributeExtensions.Add(key, source.attributeExtensions[key]);
         }
     }
     else
     {
         this.attributeExtensions = null;
     }
     if (source.elementExtensions != null)
     {
         this.elementExtensions = new SyndicationElementExtensionCollection(source.elementExtensions);
     }
     else
     {
         this.elementExtensions = null;
     }
 }
コード例 #31
0
 ExtensibleSyndicationObject(ExtensibleSyndicationObject source)
 {
     if (source.attributeExtensions != null)
     {
         this.attributeExtensions = new Dictionary<XmlQualifiedName, string>();
         foreach (XmlQualifiedName key in source.attributeExtensions.Keys)
         {
             this.attributeExtensions.Add(key, source.attributeExtensions[key]);
         }
     }
     else
     {
         this.attributeExtensions = null;
     }
     if (source.elementExtensions != null)
     {
         this.elementExtensions = new SyndicationElementExtensionCollection(source.elementExtensions);
     }
     else
     {
         this.elementExtensions = null;
     }
 }
 public ResourceCollectionInfo()
 {
     this.extensions = new ExtensibleSyndicationObject();
 }
コード例 #33
0
 public ResourceCollectionInfo()
 {
     this.extensions = new ExtensibleSyndicationObject();
 }
コード例 #34
0
 public Workspace()
 {
     this.extensions = new ExtensibleSyndicationObject();
 }
コード例 #35
0
 public Workspace()
 {
     this.extensions = new ExtensibleSyndicationObject();
 }