コード例 #1
0
        /// <summary>
        /// Gets the value of specified property in this instance.
        /// </summary>
        /// <param name="propertyDefinition">Definition of the property to get.</param>
        /// <exception cref="ServiceVersionException">Raised if this property requires a later version of Exchange.</exception>
        /// <exception cref="PropertyException">Raised if this property hasn't been assigned or loaded. Raised for set if property cannot be updated or deleted.</exception>
        public object this[PropertyDefinitionBase propertyDefinition]
        {
            get
            {
                object propertyValue;

                PropertyDefinition propDef = propertyDefinition as PropertyDefinition;
                if (propDef != null)
                {
                    return(this.PropertyBag[propDef]);
                }
                else
                {
                    ExtendedPropertyDefinition extendedPropDef = propertyDefinition as ExtendedPropertyDefinition;
                    if (extendedPropDef != null)
                    {
                        if (this.TryGetExtendedProperty(extendedPropDef, out propertyValue))
                        {
                            return(propertyValue);
                        }
                        else
                        {
                            throw new ServiceObjectPropertyException(Strings.MustLoadOrAssignPropertyBeforeAccess, propertyDefinition);
                        }
                    }
                    else
                    {
                        // Other subclasses of PropertyDefinitionBase are not supported.
                        throw new NotSupportedException(string.Format(
                                                            Strings.OperationNotSupportedForPropertyDefinitionType,
                                                            propertyDefinition.GetType().Name));
                    }
                }
            }
        }
コード例 #2
0
            /// <summary>
            /// Tries to read element from XML.
            /// </summary>
            /// <param name="reader">The reader.</param>
            /// <returns>True if element was read.</returns>
            internal override bool TryReadElementFromXml(EwsServiceXmlReader reader)
            {
                bool result = base.TryReadElementFromXml(reader);

                if (!result)
                {
                    if (reader.LocalName == XmlElementNames.FieldURIOrConstant)
                    {
                        reader.Read();
                        reader.EnsureCurrentNodeIsStartElement();

                        if (reader.IsStartElement(XmlNamespace.Types, XmlElementNames.Constant))
                        {
                            this.value = reader.ReadAttributeValue(XmlAttributeNames.Value);

                            result = true;
                        }
                        else
                        {
                            result = PropertyDefinitionBase.TryLoadFromXml(reader, ref this.otherPropertyDefinition);
                        }
                    }
                }

                return(result);
            }
コード例 #3
0
        /// <summary>
        /// Tries to load from XML.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <param name="propertyDefinition">The property definition.</param>
        /// <returns>True if property was loaded.</returns>
        internal static bool TryLoadFromXml(EwsServiceXmlReader reader, ref PropertyDefinitionBase propertyDefinition)
        {
            switch (reader.LocalName)
            {
            case XmlElementNames.FieldURI:
                propertyDefinition = ServiceObjectSchema.FindPropertyDefinition(reader.ReadAttributeValue(XmlAttributeNames.FieldURI));
                reader.SkipCurrentElement();
                return(true);

            case XmlElementNames.IndexedFieldURI:
                propertyDefinition = new IndexedPropertyDefinition(
                    reader.ReadAttributeValue(XmlAttributeNames.FieldURI),
                    reader.ReadAttributeValue(XmlAttributeNames.FieldIndex));
                reader.SkipCurrentElement();
                return(true);

            case XmlElementNames.ExtendedFieldURI:
                propertyDefinition = new ExtendedPropertyDefinition();
                (propertyDefinition as ExtendedPropertyDefinition).LoadFromXml(reader);
                return(true);

            default:
                return(false);
            }
        }
コード例 #4
0
        /// <summary>
        /// Validate request.
        /// </summary>
        internal override void Validate()
        {
            base.Validate();

            if (this.SearchQueries == null || this.SearchQueries.Count == 0)
            {
                throw new ServiceValidationException(Strings.MailboxQueriesParameterIsNotSpecified);
            }

            foreach (MailboxQuery searchQuery in this.SearchQueries)
            {
                if (searchQuery.MailboxSearchScopes == null || searchQuery.MailboxSearchScopes.Length == 0)
                {
                    throw new ServiceValidationException(Strings.MailboxQueriesParameterIsNotSpecified);
                }
            }

            if (!string.IsNullOrEmpty(this.SortByProperty))
            {
                PropertyDefinitionBase prop = null;
                try
                {
                    prop = ServiceObjectSchema.FindPropertyDefinition(this.SortByProperty);
                }
                catch (KeyNotFoundException)
                {
                }

                if (prop == null)
                {
                    throw new ServiceValidationException(string.Format(Strings.InvalidSortByPropertyForMailboxSearch, this.SortByProperty));
                }
            }
        }
コード例 #5
0
 /// <summary>
 /// ServiceObjectPropertyException Constructor.
 /// </summary>
 /// <param name="message">Error message text.</param>
 /// <param name="propertyDefinition">The definition of the property that is at the origin of the exception.</param>
 /// <param name="innerException">Inner exception.</param>
 public ServiceObjectPropertyException(
     string message,
     PropertyDefinitionBase propertyDefinition,
     Exception innerException)
     : base(message, propertyDefinition.GetPrintableName(), innerException)
 {
     this.propertyDefinition = propertyDefinition;
 }
コード例 #6
0
 /// <summary>
 /// ServiceObjectPropertyException Constructor.
 /// </summary>
 /// <param name="message">Error message text.</param>
 /// <param name="propertyDefinition">The definition of the property that is at the origin of the exception.</param>
 /// <param name="innerException">Inner exception.</param>
 public ServiceObjectPropertyException(
     string message,
     PropertyDefinitionBase propertyDefinition,
     Exception innerException)
     : base(message, propertyDefinition.GetPrintableName(), innerException)
 {
     this.propertyDefinition = propertyDefinition;
 }
コード例 #7
0
        /// <summary>
        /// Adds the specified property definition / sort direction pair to the collection.
        /// </summary>
        /// <param name="propertyDefinition">The property definition.</param>
        /// <param name="sortDirection">The sort direction.</param>
        public void Add(PropertyDefinitionBase propertyDefinition, SortDirection sortDirection)
        {
            if (this.Contains(propertyDefinition))
            {
                throw new ServiceLocalException(string.Format(Strings.PropertyAlreadyExistsInOrderByCollection, propertyDefinition.GetPrintableName()));
            }

            this.propDefSortOrderPairList.Add(new PropertyDefinitionSortDirectionPair(propertyDefinition, sortDirection));
        }
コード例 #8
0
ファイル: PropertyBag.cs プロジェクト: vsajip/ews-managed-api
        /// <summary>
        /// Creates the json delete update.
        /// </summary>
        /// <param name="propertyDefinition">The property definition.</param>
        /// <param name="service">The service.</param>
        /// <param name="serviceObject">The service object.</param>
        /// <returns></returns>
        internal static JsonObject CreateJsonDeleteUpdate(PropertyDefinitionBase propertyDefinition, ExchangeService service, ServiceObject serviceObject)
        {
            JsonObject jsonUpdate = new JsonObject();

            jsonUpdate.AddTypeParameter(serviceObject.GetDeleteFieldXmlElementName());

            jsonUpdate.Add("PropertyPath", (propertyDefinition as IJsonSerializable).ToJson(service));
            return(jsonUpdate);
        }
コード例 #9
0
        /// <summary>
        /// Validate request.
        /// </summary>
        internal override void Validate()
        {
            base.Validate();

            if (this.SearchQueries == null || this.SearchQueries.Count == 0)
            {
                throw new ServiceValidationException(Strings.MailboxQueriesParameterIsNotSpecified);
            }

            foreach (MailboxQuery searchQuery in this.SearchQueries)
            {
                if (searchQuery.MailboxSearchScopes == null || searchQuery.MailboxSearchScopes.Length == 0)
                {
                    throw new ServiceValidationException(Strings.MailboxQueriesParameterIsNotSpecified);
                }

                foreach (MailboxSearchScope searchScope in searchQuery.MailboxSearchScopes)
                {
                    if (searchScope.ExtendedAttributes != null && searchScope.ExtendedAttributes.Count > 0 && !DiscoverySchemaChanges.SearchMailboxesExtendedData.IsCompatible(this))
                    {
                        throw new ServiceVersionException(
                                  string.Format(
                                      Strings.ClassIncompatibleWithRequestVersion,
                                      typeof(ExtendedAttribute).Name,
                                      DiscoverySchemaChanges.SearchMailboxesExtendedData.MinimumServerVersion));
                    }

                    if (searchScope.SearchScopeType != MailboxSearchScopeType.LegacyExchangeDN && (!DiscoverySchemaChanges.SearchMailboxesExtendedData.IsCompatible(this) || !DiscoverySchemaChanges.SearchMailboxesAdditionalSearchScopes.IsCompatible(this)))
                    {
                        throw new ServiceVersionException(
                                  string.Format(
                                      Strings.EnumValueIncompatibleWithRequestVersion,
                                      searchScope.SearchScopeType.ToString(),
                                      typeof(MailboxSearchScopeType).Name,
                                      DiscoverySchemaChanges.SearchMailboxesAdditionalSearchScopes.MinimumServerVersion));
                    }
                }
            }

            if (!string.IsNullOrEmpty(this.SortByProperty))
            {
                PropertyDefinitionBase prop = null;
                try
                {
                    prop = ServiceObjectSchema.FindPropertyDefinition(this.SortByProperty);
                }
                catch (KeyNotFoundException)
                {
                }

                if (prop == null)
                {
                    throw new ServiceValidationException(string.Format(Strings.InvalidSortByPropertyForMailboxSearch, this.SortByProperty));
                }
            }
        }
コード例 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContainsSubstring"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="value">The value to compare with.</param>
 /// <param name="containmentMode">The containment mode.</param>
 /// <param name="comparisonMode">The comparison mode.</param>
 public ContainsSubstring(
     PropertyDefinitionBase propertyDefinition,
     string value,
     ContainmentMode containmentMode,
     ComparisonMode comparisonMode)
     : this(propertyDefinition, value)
 {
     this.containmentMode = containmentMode;
     this.comparisonMode = comparisonMode;
 }
コード例 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContainsSubstring"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="value">The value to compare with.</param>
 /// <param name="containmentMode">The containment mode.</param>
 /// <param name="comparisonMode">The comparison mode.</param>
 public ContainsSubstring(
     PropertyDefinitionBase propertyDefinition,
     string value,
     ContainmentMode containmentMode,
     ComparisonMode comparisonMode)
     : this(propertyDefinition, value)
 {
     this.containmentMode = containmentMode;
     this.comparisonMode  = comparisonMode;
 }
コード例 #12
0
        /// <summary>
        /// Tries to get the value for a property definition in the collection.
        /// </summary>
        /// <param name="propertyDefinition">The property definition.</param>
        /// <param name="sortDirection">The sort direction.</param>
        /// <returns>True if collection contains property definition, otherwise false.</returns>
        public bool TryGetValue(PropertyDefinitionBase propertyDefinition, out SortDirection sortDirection)
        {
            foreach (PropertyDefinitionSortDirectionPair pair in this.propDefSortOrderPairList)
            {
                if (pair.Value.Equals(propertyDefinition))
                {
                    sortDirection = pair.Value;
                    return(true);
                }
            }

            sortDirection = SortDirection.Ascending;        // out parameter has to be set to some value.
            return(false);
        }
コード例 #13
0
            /// <summary>
            /// Loads from json.
            /// </summary>
            /// <param name="jsonProperty">The json property.</param>
            /// <param name="service">The service.</param>
            internal override void LoadFromJson(JsonObject jsonProperty, ExchangeService service)
            {
                base.LoadFromJson(jsonProperty, service);

                JsonObject jsonFieldUriOrConstant = jsonProperty.ReadAsJsonObject(XmlElementNames.FieldURIOrConstant).ReadAsJsonObject(XmlElementNames.Item);

                if (jsonFieldUriOrConstant.ReadTypeString() == XmlElementNames.Constant)
                {
                    this.value = jsonFieldUriOrConstant[XmlElementNames.Value];
                }
                else
                {
                    this.otherPropertyDefinition = PropertyDefinitionBase.TryLoadFromJson(jsonProperty);
                }
            }
コード例 #14
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Grouping"/> class.
        /// </summary>
        /// <param name="groupOn">The property to group on.</param>
        /// <param name="sortDirection">The sort direction.</param>
        /// <param name="aggregateOn">The property to aggregate on.</param>
        /// <param name="aggregateType">The type of aggregate to calculate.</param>
        public Grouping(
            PropertyDefinitionBase groupOn,
            SortDirection sortDirection,
            PropertyDefinitionBase aggregateOn,
            AggregateType aggregateType)
            : this()
        {
            EwsUtilities.ValidateParam(groupOn, "groupOn");
            EwsUtilities.ValidateParam(aggregateOn, "aggregateOn");

            this.groupOn       = groupOn;
            this.sortDirection = sortDirection;
            this.aggregateOn   = aggregateOn;
            this.aggregateType = aggregateType;
        }
コード例 #15
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Grouping"/> class.
        /// </summary>
        /// <param name="groupOn">The property to group on.</param>
        /// <param name="sortDirection">The sort direction.</param>
        /// <param name="aggregateOn">The property to aggregate on.</param>
        /// <param name="aggregateType">The type of aggregate to calculate.</param>
        public Grouping(
            PropertyDefinitionBase groupOn,
            SortDirection sortDirection,
            PropertyDefinitionBase aggregateOn,
            AggregateType aggregateType)
            : this()
        {
            EwsUtilities.ValidateParam(groupOn, "groupOn");
            EwsUtilities.ValidateParam(aggregateOn, "aggregateOn");

            this.groupOn = groupOn;
            this.sortDirection = sortDirection;
            this.aggregateOn = aggregateOn;
            this.aggregateType = aggregateType;
        }
コード例 #16
0
 /// <summary>
 /// Tries to load from XML.
 /// </summary>
 /// <param name="reader">The reader.</param>
 /// <param name="propertyDefinition">The property definition.</param>
 /// <returns>True if property was loaded.</returns>
 internal static bool TryLoadFromXml(EwsServiceXmlReader reader, ref PropertyDefinitionBase propertyDefinition)
 {
     switch (reader.LocalName)
     {
         case XmlElementNames.FieldURI:
             propertyDefinition = ServiceObjectSchema.FindPropertyDefinition(reader.ReadAttributeValue(XmlAttributeNames.FieldURI));
             reader.SkipCurrentElement();
             return true;
         case XmlElementNames.IndexedFieldURI:
             propertyDefinition = new IndexedPropertyDefinition(
                 reader.ReadAttributeValue(XmlAttributeNames.FieldURI),
                 reader.ReadAttributeValue(XmlAttributeNames.FieldIndex));
             reader.SkipCurrentElement();
             return true;
         case XmlElementNames.ExtendedFieldURI:
             propertyDefinition = new ExtendedPropertyDefinition();
             (propertyDefinition as ExtendedPropertyDefinition).LoadFromXml(reader);
             return true;
         default:
             return false;
     }
 }
コード例 #17
0
        /// <summary>
        /// Try to get the value of a specified property in this instance.
        /// </summary>
        /// <param name="propertyDefinition">The property definition.</param>
        /// <param name="propertyValue">The property value.</param>
        /// <typeparam name="T">Type of expected property value.</typeparam>
        /// <returns>True if property retrieved, false otherwise.</returns>
        public bool TryGetProperty <T>(PropertyDefinitionBase propertyDefinition, out T propertyValue)
        {
            PropertyDefinition propDef = propertyDefinition as PropertyDefinition;

            if (propDef != null)
            {
                return(this.PropertyBag.TryGetProperty <T>(propDef, out propertyValue));
            }
            else
            {
                ExtendedPropertyDefinition extPropDef = propertyDefinition as ExtendedPropertyDefinition;
                if (extPropDef != null)
                {
                    return(this.TryGetExtendedProperty <T>(extPropDef, out propertyValue));
                }
                else
                {
                    // Other subclasses of PropertyDefinitionBase are not supported.
                    throw new NotSupportedException(string.Format(
                                                        Strings.OperationNotSupportedForPropertyDefinitionType,
                                                        propertyDefinition.GetType().Name));
                }
            }
        }
コード例 #18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IsEqualTo"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="otherPropertyDefinition">The definition of the property to compare with. Property definitions are available on schema classes (EmailMessageSchema, AppointmentSchema, etc.)</param>
 public IsEqualTo(PropertyDefinitionBase propertyDefinition, PropertyDefinitionBase otherPropertyDefinition)
     : base(propertyDefinition, otherPropertyDefinition)
 {
 }
コード例 #19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:Microsoft.Exchange.WebServices.Data.ServiceObjectPropertyException"/> class with serialized data.
 /// </summary>
 /// <param name="info">The object that holds the serialized object data.</param>
 /// <param name="context">The contextual information about the source or destination.</param>
 protected ServiceObjectPropertyException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     this.propertyDefinition = (PropertyDefinitionBase)info.GetValue("PropertyDefinition", typeof(PropertyDefinitionBase));
 }
コード例 #20
0
 /// <summary>
 /// Try to get the value of a specified property in this instance.
 /// </summary>
 /// <param name="propertyDefinition">The property definition.</param>
 /// <param name="propertyValue">The property value.</param>
 /// <returns>True if property retrieved, false otherwise.</returns>
 public bool TryGetProperty(PropertyDefinitionBase propertyDefinition, out object propertyValue)
 {
     return(this.TryGetProperty <object>(propertyDefinition, out propertyValue));
 }
コード例 #21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PropertyBasedFilter"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The property definition.</param>
 internal PropertyBasedFilter(PropertyDefinitionBase propertyDefinition)
     : base()
 {
     this.propertyDefinition = propertyDefinition;
 }
コード例 #22
0
 /// <summary>
 /// Loads from json.
 /// </summary>
 /// <param name="jsonProperty">The json property.</param>
 /// <param name="service">The service.</param>
 internal override void LoadFromJson(JsonObject jsonProperty, ExchangeService service)
 {
     this.PropertyDefinition = PropertyDefinitionBase.TryLoadFromJson(jsonProperty.ReadAsJsonObject(XmlElementNames.Item));
 }
コード例 #23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RelationalFilter"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="otherPropertyDefinition">The definition of the property to compare with. Property definitions are available as static members from schema classes (for example, EmailMessageSchema, AppointmentSchema, etc.)</param>
 internal RelationalFilter(PropertyDefinitionBase propertyDefinition, PropertyDefinitionBase otherPropertyDefinition)
     : base(propertyDefinition)
 {
     this.otherPropertyDefinition = otherPropertyDefinition;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="IsGreaterThanOrEqualTo"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="otherPropertyDefinition">The definition of the property to compare with. Property definitions are available on schema classes (EmailMessageSchema, AppointmentSchema, etc.)</param>
 public IsGreaterThanOrEqualTo(PropertyDefinitionBase propertyDefinition, PropertyDefinitionBase otherPropertyDefinition)
     : base(propertyDefinition, otherPropertyDefinition)
 {
 }
コード例 #25
0
 /// <summary>
 /// ServiceObjectPropertyException constructor.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is at the origin of the exception.</param>
 public ServiceObjectPropertyException(PropertyDefinitionBase propertyDefinition)
     : base(propertyDefinition.GetPrintableName())
 {
     this.propertyDefinition = propertyDefinition;
 }
コード例 #26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContainsSubstring"/> class.
 /// The ContainmentMode property is initialized to ContainmentMode.Substring, and 
 /// the ComparisonMode property is initialized to ComparisonMode.IgnoreCase.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="value">The value to compare with.</param>
 public ContainsSubstring(PropertyDefinitionBase propertyDefinition, string value)
     : base(propertyDefinition)
 {
     this.value = value;
 }
コード例 #27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IsLessThan"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="value">The value to compare the property with.</param>
 public IsLessThan(PropertyDefinitionBase propertyDefinition, object value)
     : base(propertyDefinition, value)
 {
 }
コード例 #28
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExcludesBitmask"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="bitmask">The bitmask to compare with.</param>
 public ExcludesBitmask(PropertyDefinitionBase propertyDefinition, int bitmask)
     : base(propertyDefinition)
 {
     this.bitmask = bitmask;
 }
コード例 #29
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IsLessThan"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="otherPropertyDefinition">The definition of the property to compare with. Property definitions are available on schema classes (EmailMessageSchema, AppointmentSchema, etc.)</param>
 public IsLessThan(PropertyDefinitionBase propertyDefinition, PropertyDefinitionBase otherPropertyDefinition)
     : base(propertyDefinition, otherPropertyDefinition)
 {
 }
コード例 #30
0
        /// <summary>
        /// Removes the specified property definition from the collection.
        /// </summary>
        /// <param name="propertyDefinition">The property definition.</param>
        /// <returns>True if the property definition is successfully removed; otherwise, false</returns>
        public bool Remove(PropertyDefinitionBase propertyDefinition)
        {
            int count = this.propDefSortOrderPairList.RemoveAll((pair) => pair.Key.Equals(propertyDefinition));

            return(count > 0);
        }
コード例 #31
0
 /// <summary>
 /// Determines whether the collection contains the specified property definition.
 /// </summary>
 /// <param name="propertyDefinition">The property definition.</param>
 /// <returns>True if the collection contains the specified property definition; otherwise, false.</returns>
 internal bool Contains(PropertyDefinitionBase propertyDefinition)
 {
     return(this.propDefSortOrderPairList.Exists((pair) => pair.Key.Equals(propertyDefinition)));
 }
コード例 #32
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContainsSubstring"/> class.
 /// The ContainmentMode property is initialized to ContainmentMode.Substring, and
 /// the ComparisonMode property is initialized to ComparisonMode.IgnoreCase.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="value">The value to compare with.</param>
 public ContainsSubstring(PropertyDefinitionBase propertyDefinition, string value)
     : base(propertyDefinition)
 {
     this.value = value;
 }
コード例 #33
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IsEqualTo"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="value">The value to compare the property with.</param>
 public IsEqualTo(PropertyDefinitionBase propertyDefinition, object value)
     : base(propertyDefinition, value)
 {
 }
コード例 #34
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RelationalFilter"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="value">The value to compare with.</param>
 internal RelationalFilter(PropertyDefinitionBase propertyDefinition, object value)
     : base(propertyDefinition)
 {
     this.value = value;
 }
コード例 #35
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RelationalFilter"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="otherPropertyDefinition">The definition of the property to compare with. Property definitions are available as static members from schema classes (for example, EmailMessageSchema, AppointmentSchema, etc.)</param>
 internal RelationalFilter(PropertyDefinitionBase propertyDefinition, PropertyDefinitionBase otherPropertyDefinition)
     : base(propertyDefinition)
 {
     this.otherPropertyDefinition = otherPropertyDefinition;
 }
コード例 #36
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Exists"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property to check the existence of. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 public Exists(PropertyDefinitionBase propertyDefinition)
     : base(propertyDefinition)
 {
 }
コード例 #37
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RelationalFilter"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="value">The value to compare with.</param>
 internal RelationalFilter(PropertyDefinitionBase propertyDefinition, object value)
     : base(propertyDefinition)
 {
     this.value = value;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="IsGreaterThanOrEqualTo"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="value">The value to compare the property with.</param>
 public IsGreaterThanOrEqualTo(PropertyDefinitionBase propertyDefinition, object value)
     : base(propertyDefinition, value)
 {
 }
コード例 #39
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IsEqualTo"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="otherPropertyDefinition">The definition of the property to compare with. Property definitions are available on schema classes (EmailMessageSchema, AppointmentSchema, etc.)</param>
 public IsEqualTo(PropertyDefinitionBase propertyDefinition, PropertyDefinitionBase otherPropertyDefinition)
     : base(propertyDefinition, otherPropertyDefinition)
 {
 }
コード例 #40
0
 /// <summary>
 /// Tries to read element from XML.
 /// </summary>
 /// <param name="reader">The reader.</param>
 /// <returns>True if element was read.</returns>
 internal override bool TryReadElementFromXml(EwsServiceXmlReader reader)
 {
     return(PropertyDefinitionBase.TryLoadFromXml(reader, ref this.propertyDefinition));
 }
コード例 #41
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Exists"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property to check the existence of. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 public Exists(PropertyDefinitionBase propertyDefinition)
     : base(propertyDefinition)
 {
 }
コード例 #42
0
 /// <summary>
 /// ServiceObjectPropertyException constructor.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is at the origin of the exception.</param>
 public ServiceObjectPropertyException(PropertyDefinitionBase propertyDefinition)
     : base(propertyDefinition.GetPrintableName())
 {
     this.propertyDefinition = propertyDefinition;
 }
コード例 #43
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IsLessThan"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="otherPropertyDefinition">The definition of the property to compare with. Property definitions are available on schema classes (EmailMessageSchema, AppointmentSchema, etc.)</param>
 public IsLessThan(PropertyDefinitionBase propertyDefinition, PropertyDefinitionBase otherPropertyDefinition)
     : base(propertyDefinition, otherPropertyDefinition)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PropertyBasedFilter"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The property definition.</param>
 internal PropertyBasedFilter(PropertyDefinitionBase propertyDefinition)
     : base()
 {
     this.propertyDefinition = propertyDefinition;
 }
コード例 #45
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IsLessThan"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="value">The value to compare the property with.</param>
 public IsLessThan(PropertyDefinitionBase propertyDefinition, object value)
     : base(propertyDefinition, value)
 {
 }
コード例 #46
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExcludesBitmask"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="bitmask">The bitmask to compare with.</param>
 public ExcludesBitmask(PropertyDefinitionBase propertyDefinition, int bitmask)
     : base(propertyDefinition)
 {
     this.bitmask = bitmask;
 }
コード例 #47
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IsEqualTo"/> class.
 /// </summary>
 /// <param name="propertyDefinition">The definition of the property that is being compared. Property definitions are available as static members from schema classes (for example, EmailMessageSchema.Subject, AppointmentSchema.Start, ContactSchema.GivenName, etc.)</param>
 /// <param name="value">The value to compare the property with.</param>
 public IsEqualTo(PropertyDefinitionBase propertyDefinition, object value)
     : base(propertyDefinition, value)
 {
 }