예제 #1
0
        public static IModelSaveResult <File> SaveFile <TProviderFilter>(
            this IFileStoreStep <File, TProviderFilter> fileStoreStep,
            string filename,
            byte[] contentBytes)
            where TProviderFilter : class, IProviderTypeFilter
        {
            Mandate.ParameterNotNullOrEmpty(filename, "filename");
            var file = new File(filename, contentBytes);

            return(fileStoreStep.SaveFile(file));
        }
예제 #2
0
        public static IModelSaveResult <File> CreateDirectory <TProviderFilter>(
            this IFileStoreStep <File, TProviderFilter> fileStoreStep,
            string containerName)
            where TProviderFilter : class, IProviderTypeFilter
        {
            Mandate.ParameterNotNullOrEmpty(containerName, "containerName");
            var file = new File {
                IsContainer = true, Name = containerName
            };

            return(fileStoreStep.SaveFile(file));
        }