コード例 #1
0
ファイル: BlogPosting.cs プロジェクト: Vanaheimr/UsersAPI
            /// <summary>
            /// Create a new Posting builder.
            /// </summary>
            /// <param name="Id">The unique identification of this blog posting.</param>
            /// <param name="Text">The (multi-language) text of this blog posting.</param>
            /// <param name="PublicationDate">The timestamp of the publication of this blog posting.</param>
            /// <param name="GeoLocation">An optional geographical location of this blog posting.</param>
            /// <param name="Tags">An enumeration of multi-language tags and their relevance.</param>
            /// <param name="PrivacyLevel">Whether the blog posting will be shown in blog posting listings, or not.</param>
            /// <param name="IsHidden">The blog posting is hidden.</param>
            /// <param name="Signatures">All signatures of this blog posting.</param>
            /// <param name="DataSource">The source of all this data, e.g. an automatic importer.</param>
            public Builder(BlogPosting_Id Id,
                           I18NString Text,
                           DateTime?PublicationDate        = null,
                           GeoCoordinate?GeoLocation       = null,
                           IEnumerable <TagRelevance> Tags = null,
                           PrivacyLevel?PrivacyLevel       = null,
                           Boolean IsHidden = false,
                           IEnumerable <BlogPostingSignature> Signatures = null,
                           String DataSource = "")

            {
                this.Id              = Id;
                this.Text            = Text;
                this.PublicationDate = PublicationDate ?? DateTime.Now;
                this.GeoLocation     = GeoLocation;
                this.Tags            = Tags ?? new TagRelevance[0];
                this.PrivacyLevel    = PrivacyLevel ?? social.OpenData.UsersAPI.PrivacyLevel.Private;
                this.IsHidden        = false;
                this.Signatures      = Signatures ?? new BlogPostingSignature[0];
                this.DataSource      = DataSource;
            }
コード例 #2
0
ファイル: BlogPosting.cs プロジェクト: Vanaheimr/UsersAPI
            /// <summary>
            /// Create a new Posting builder.
            /// </summary>
            /// <param name="Text">The (multi-language) text of this blog posting.</param>
            /// <param name="PublicationDate">The timestamp of the publication of this blog posting.</param>
            /// <param name="GeoLocation">An optional geographical location of this blog posting.</param>
            /// <param name="Tags">An enumeration of multi-language tags and their relevance.</param>
            /// <param name="PrivacyLevel">Whether the blog posting will be shown in blog posting listings, or not.</param>
            /// <param name="IsHidden">The blog posting is hidden.</param>
            /// <param name="Signatures">All signatures of this blog posting.</param>
            /// <param name="DataSource">The source of all this data, e.g. an automatic importer.</param>
            public Builder(I18NString Text,
                           DateTime?PublicationDate        = null,
                           GeoCoordinate?GeoLocation       = null,
                           IEnumerable <TagRelevance> Tags = null,
                           PrivacyLevel?PrivacyLevel       = null,
                           Boolean IsHidden = false,
                           IEnumerable <BlogPostingSignature> Signatures = null,
                           String DataSource = "")

                : this(BlogPosting_Id.Random(),
                       Text,
                       PublicationDate,
                       GeoLocation,
                       Tags,
                       PrivacyLevel,
                       IsHidden,
                       Signatures,
                       DataSource)

            {
            }