Esempio n. 1
0
        public T GetRefTypePropValue <T>(PropertyDefinition propDefinition) where T : class
        {
            object obj = this.messageItem.TryGetProperty(propDefinition);

            SubmissionItemBase.LogPropError(obj);
            return(obj as T);
        }
Esempio n. 2
0
        public static T GetRefTypePropValue <T>(Recipient recipient, PropertyDefinition propDefinition) where T : class
        {
            object obj = recipient.TryGetProperty(propDefinition);

            SubmissionItemBase.LogPropError(obj);
            return(obj as T);
        }
Esempio n. 3
0
        public T GetPropValue <T>(PropertyDefinition propDefinition, T defaultValue) where T : struct
        {
            object obj = this.messageItem.TryGetProperty(propDefinition);

            SubmissionItemBase.LogPropError(obj);
            if (obj != null && obj is T)
            {
                return((T)((object)obj));
            }
            return(defaultValue);
        }
Esempio n. 4
0
        public T?GetValueTypePropValue <T>(PropertyDefinition propDefinition) where T : struct
        {
            object obj = this.messageItem.TryGetProperty(propDefinition);

            SubmissionItemBase.LogPropError(obj);
            if (obj == null || !(obj is T))
            {
                return(null);
            }
            return(new T?((T)((object)obj)));
        }
Esempio n. 5
0
        public static T?GetValueTypePropValue <T>(Recipient recipient, PropertyDefinition propDefinition) where T : struct
        {
            object obj = recipient.TryGetProperty(propDefinition);

            SubmissionItemBase.LogPropError(obj);
            if (obj == null || !(obj is T))
            {
                return(null);
            }
            return(new T?((T)((object)obj)));
        }