コード例 #1
0
 internal FunctionalId(DatastoreModel parent, string label, string prefix, IdFormat format, int startFrom)
 {
     Label     = label;
     Prefix    = prefix;
     Format    = format;
     StartFrom = startFrom < 0 ? 0 : startFrom;
     Guid      = parent?.GenerateGuid(label) ?? Guid.Empty;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AlternatePublicFolderItemId"/> class.
 /// </summary>
 /// <param name="format">The format in which the public folder item Id is expressed.</param>
 /// <param name="folderId">The Id of the parent public folder of the public folder item.</param>
 /// <param name="itemId">The Id of the public folder item.</param>
 public AlternatePublicFolderItemId(
     IdFormat format,
     string folderId,
     string itemId)
     : base(format, folderId)
 {
     this.itemId = itemId;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AlternatePublicFolderItemId"/> class.
 /// </summary>
 /// <param name="format">The format in which the public folder item Id is expressed.</param>
 /// <param name="folderId">The Id of the parent public folder of the public folder item.</param>
 /// <param name="itemId">The Id of the public folder item.</param>
 public AlternatePublicFolderItemId(
     IdFormat format,
     string folderId,
     string itemId)
     : base(format, folderId)
 {
     this.itemId = itemId;
 }
コード例 #4
0
ファイル: AlternateId.cs プロジェクト: asine/ews-managed-api
 /// <summary>
 /// Initializes a new instance of the <see cref="AlternateId"/> class.
 /// </summary>
 /// <param name="format">The format the Id is expressed in.</param>
 /// <param name="id">The Id.</param>
 /// <param name="mailbox">The SMTP address of the mailbox that the Id belongs to.</param>
 public AlternateId(
     IdFormat format,
     string id,
     string mailbox)
     : base(format)
 {
     this.UniqueId = id;
     this.Mailbox = mailbox;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AlternateId"/> class.
 /// </summary>
 /// <param name="format">The format the Id is expressed in.</param>
 /// <param name="id">The Id.</param>
 /// <param name="mailbox">The SMTP address of the mailbox that the Id belongs to.</param>
 public AlternateId(
     IdFormat format,
     string id,
     string mailbox)
     : base(format)
 {
     this.UniqueId = id;
     this.Mailbox  = mailbox;
 }
コード例 #6
0
ファイル: AlternateId.cs プロジェクト: asine/ews-managed-api
 /// <summary>
 /// Initializes a new instance of the <see cref="AlternateId"/> class.
 /// </summary>
 /// <param name="format">The format the Id is expressed in.</param>
 /// <param name="id">The Id.</param>
 /// <param name="mailbox">The SMTP address of the mailbox that the Id belongs to.</param>
 /// <param name="isArchive">Primary (false) or archive (true) mailbox.</param>
 public AlternateId(
     IdFormat format,
     string id,
     string mailbox,
     bool isArchive)
     : base(format)
 {
     this.UniqueId = id;
     this.Mailbox = mailbox;
     this.IsArchive = isArchive;
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AlternateId"/> class.
 /// </summary>
 /// <param name="format">The format the Id is expressed in.</param>
 /// <param name="id">The Id.</param>
 /// <param name="mailbox">The SMTP address of the mailbox that the Id belongs to.</param>
 /// <param name="isArchive">Primary (false) or archive (true) mailbox.</param>
 public AlternateId(
     IdFormat format,
     string id,
     string mailbox,
     bool isArchive)
     : base(format)
 {
     this.UniqueId  = id;
     this.Mailbox   = mailbox;
     this.IsArchive = isArchive;
 }
コード例 #8
0
        public FunctionalId New(string label, string prefix, IdFormat format = IdFormat.Hash, int startFrom = 0)
        {
            if (collection.Any(item => item.Value.Prefix == prefix))
            {
                throw new InvalidOperationException(string.Format("You cannot have multiple FunctionalIds that have the same prefix '{0}'.", prefix));
            }

            FunctionalId value = new FunctionalId(Parent, label, prefix, format, startFrom);

            collection.Add(label, value);

            return(value);
        }
コード例 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AlternateId"/> class.
 /// </summary>
 /// <param name="format">The format the Id is expressed in.</param>
 /// <param name="id">The Id.</param>
 /// <param name="mailbox">The SMTP address of the mailbox that the Id belongs to.</param>
 AlternateId(
     IdFormat format,
     String id,
     String mailbox)
     : super(format)
コード例 #10
0
 /// <summary>
 /// Initializes a new instance of AlternatePublicFolderId.
 /// </summary>
 /// <param name="format">The format in which the public folder Id is expressed.</param>
 /// <param name="folderId">The Id of the public folder.</param>
 public AlternatePublicFolderId(IdFormat format, string folderId)
     : base(format)
 {
     this.FolderId = folderId;
 }
コード例 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AlternateIdBase"/> class.
 /// </summary>
 /// <param name="format">The format.</param>
 internal AlternateIdBase(IdFormat format)
     : this()
 {
     this.Format = format;
 }
コード例 #12
0
 /// <summary>
 /// Loads the attributes from XML.
 /// </summary>
 /// <param name="reader">The reader.</param>
 internal virtual void LoadAttributesFromXml(EwsServiceXmlReader reader)
 {
     this.Format = reader.ReadAttributeValue <IdFormat>(XmlAttributeNames.Format);
 }
コード例 #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AlternateIdBase"/> class.
 /// </summary>
 /// <param name="format">The format.</param>
 internal AlternateIdBase(IdFormat format)
     : this()
 {
     this.Format = format;
 }
コード例 #14
0
 /// <summary>
 /// Initializes a new instance of AlternatePublicFolderId.
 /// </summary>
 /// <param name="format">The format in which the public folder Id is expressed.</param>
 /// <param name="folderId">The Id of the public folder.</param>
 public AlternatePublicFolderId(IdFormat format, string folderId)
     : base(format)
 {
     this.FolderId = folderId;
 }
コード例 #15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AlternateId"/> class.
 /// </summary>
 /// <param name="format">The format the Id is expressed in.</param>
 /// <param name="id">The Id.</param>
 /// <param name="mailbox">The SMTP address of the mailbox that the Id belongs to.</param>
 /// <param name="isArchive">Primary (false) or archive (true) mailbox.</param>
 AlternateId(
     IdFormat format,
     String id,
     String mailbox,
     bool isArchive)
     : super(format)
コード例 #16
0
 /// <summary>
 /// Initializes a new instance of AlternatePublicFolderId.
 /// </summary>
 /// <param name="format">The format in which the public folder Id is expressed.</param>
 /// <param name="folderId">The Id of the public folder.</param>
 AlternatePublicFolderId(IdFormat format, String folderId)
     : super(format)
コード例 #17
0
 /// <summary>
 /// Loads the attributes from XML.
 /// </summary>
 /// <param name="reader">The reader.</param>
 internal virtual void LoadAttributesFromXml(EwsServiceXmlReader reader)
 {
     this.Format = reader.ReadAttributeValue<IdFormat>(XmlAttributeNames.Format);
 }
コード例 #18
0
 public FunctionalId New(Entity entity, string prefix, IdFormat format = IdFormat.Hash, int startFrom = 0)
 {
     return(New(entity.Label.Name, prefix, format, startFrom));
 }
コード例 #19
0
 /// <summary>
 /// Loads the attributes from json.
 /// </summary>
 /// <param name="responseObject">The response object.</param>
 internal virtual void LoadAttributesFromJson(JsonObject responseObject)
 {
     this.Format = responseObject.ReadEnumValue <IdFormat>(XmlAttributeNames.Format);
 }