Example #1
0
 public SqlServerUploadedFile(SqlServerUploadStorageProvider provider,
                              string controlUniqueID,
                              string fileName,
                              string contentType,
                              UploadStorageConfig storageConfig
                              ) : base(controlUniqueID, fileName, contentType)
 {
     Initialize(provider, storageConfig);
 }
 public SqlServerUploadedFile(   SqlServerUploadStorageProvider provider,
                                 string controlUniqueID, 
                                 string fileName, 
                                 string contentType,
                                 UploadStorageConfig storageConfig
                             )
     : base(controlUniqueID, fileName, contentType)
 {
     Initialize(provider, storageConfig);
 }
Example #3
0
        private void Initialize(SqlServerUploadStorageProvider provider,
                                UploadStorageConfig storageConfig)
        {
            //Simply store the provider, the SqlServerBlobStream takes care of everything else (i hope)
            _provider = provider;

            // If hash algorithm is specified, create an object to calculate hash
            if (provider.HashAlgorithm != null && provider.HashAlgorithm.Length > 0)
            {
                _hashName = provider.HashAlgorithm;
            }
        }
        private void Initialize(SqlServerUploadStorageProvider provider,
                                        UploadStorageConfig storageConfig)
        {
            //Simply store the provider, the SqlServerBlobStream takes care of everything else (i hope)
            _provider = provider;

            // If hash algorithm is specified, create an object to calculate hash
            if (provider.HashAlgorithm != null && provider.HashAlgorithm.Length > 0){
                _hashName = provider.HashAlgorithm;
                _hashAlgorithm = System.Security.Cryptography.HashAlgorithm.Create(provider.HashAlgorithm);
            }
        }