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; }
/// <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; }
/// <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; }
/// <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; }
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); }
/// <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)
/// <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; }
/// <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; }
/// <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); }
/// <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)
/// <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)
/// <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); }
public FunctionalId New(Entity entity, string prefix, IdFormat format = IdFormat.Hash, int startFrom = 0) { return(New(entity.Label.Name, prefix, format, startFrom)); }
/// <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); }