public T With <CType>(string message) where CType : IMetaResult { this.MetaResult = Activator.CreateInstance <CType>(); if (!string.IsNullOrWhiteSpace(message)) { this.MetaResult.Message = message; } return((T)this); }
/// <summary> /// This helps to customize your MetaResponse /// with your own massage, code, and name response /// </summary> /// <typeparam name="CType"> Type of custom MetaResponse </typeparam> /// <param name="metaResponse"></param> /// <returns></returns> public T With <CType>() where CType : IMetaResult { this.MetaResult = Activator.CreateInstance <CType>(); return((T)this); }