public T GetRefTypePropValue <T>(PropertyDefinition propDefinition) where T : class { object obj = this.messageItem.TryGetProperty(propDefinition); SubmissionItemBase.LogPropError(obj); return(obj as T); }
public static T GetRefTypePropValue <T>(Recipient recipient, PropertyDefinition propDefinition) where T : class { object obj = recipient.TryGetProperty(propDefinition); SubmissionItemBase.LogPropError(obj); return(obj as T); }
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); }
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))); }
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))); }