public IDataPack CreateFrom <TType>(params TType[] data) { if (HasNoData(data)) { return(EmptyDataPackSingleton.GetInstance()); } if (HasNoDataPackPreciselyForThisType(typeof(TType[]))) { return(new JsonDataPack(data)); } return(CreateDataPack(data)); }
public static EmptyDataPackSingleton GetInstance() { return(_pack ?? (_pack = new EmptyDataPackSingleton())); }