public IDataPack CreateFrom <TType>(params TType[] data)
        {
            if (HasNoData(data))
            {
                return(EmptyDataPackSingleton.GetInstance());
            }

            if (HasNoDataPackPreciselyForThisType(typeof(TType[])))
            {
                return(new JsonDataPack(data));
            }

            return(CreateDataPack(data));
        }
示例#2
0
 public static EmptyDataPackSingleton GetInstance()
 {
     return(_pack ?? (_pack = new EmptyDataPackSingleton()));
 }