Exemple #1
0
        public override bool Equals(object obj)
        {
            TemplateKey other = obj as TemplateKey;

            return(Object.ReferenceEquals(this, other) || !Object.ReferenceEquals(other, null) &&
                   Object.Equals(this.TargetType, other.TargetType));
        }
Exemple #2
0
        /// <summary>Initializes a new instance of the <see cref="T:System.Windows.DataTemplate" /> class with the specified <see cref="P:System.Windows.DataTemplate.DataType" /> property.</summary>
        /// <param name="dataType">If the template is intended for object data, this is the Type name of the data object. </param>
        // Token: 0x06000384 RID: 900 RVA: 0x0000A1FC File Offset: 0x000083FC
        public DataTemplate(object dataType)
        {
            Exception ex = TemplateKey.ValidateDataType(dataType, "dataType");

            if (ex != null)
            {
                throw ex;
            }
            this._dataType = dataType;
        }
Exemple #3
0
        /// <summary> Override of Object.Equals() </summary>
        public override bool Equals(object o)
        {
            TemplateKey key = o as TemplateKey;

            if (key != null)
            {
                return(_templateType == key._templateType &&
                       Object.Equals(_dataType, key._dataType));
            }
            return(false);
        }
Exemple #4
0
        /// <summary>Initializes a new instance of the <see cref="T:System.Windows.TemplateKey" /> class with the specified parameters. This constructor is protected.</summary>
        /// <param name="templateType">A <see cref="T:System.Windows.TemplateKey.TemplateType" /> value that specifies the type of this template.</param>
        /// <param name="dataType">The type for which this template is designed.</param>
        // Token: 0x06000C10 RID: 3088 RVA: 0x0002CFE4 File Offset: 0x0002B1E4
        protected TemplateKey(TemplateKey.TemplateType templateType, object dataType)
        {
            Exception ex = TemplateKey.ValidateDataType(dataType, "dataType");

            if (ex != null)
            {
                throw ex;
            }
            this._dataType     = dataType;
            this._templateType = templateType;
        }
 protected TemplateKey(TemplateKey.TemplateType templateType)
 {
 }
Exemple #6
0
        /// <summary>Returns a value that indicates whether the given instance is identical to this instance of <see cref="T:System.Windows.TemplateKey" />.</summary>
        /// <param name="o">The object to compare for equality.</param>
        /// <returns>
        ///     <see langword="true" /> if the two instances are identical; otherwise, <see langword="false" />.</returns>
        // Token: 0x06000C16 RID: 3094 RVA: 0x0002D128 File Offset: 0x0002B328
        public override bool Equals(object o)
        {
            TemplateKey templateKey = o as TemplateKey;

            return(templateKey != null && this._templateType == templateKey._templateType && object.Equals(this._dataType, templateKey._dataType));
        }