Exemple #1
0
        public SqlClientUploadStreamProvider(NameValueConfigurationSection configuration)
        {
            string text = configuration["criteriaMethod"];
            bool   flag = text != null && text.Length != 0;

            if (flag)
            {
                this._criteriaMethod = (SqlClientUploadStreamProvider.CriteriaMethod)Enum.Parse(typeof(SqlClientUploadStreamProvider.CriteriaMethod), text, true);
            }
            else
            {
                this._criteriaMethod = SqlClientUploadStreamProvider.CriteriaMethod.Identity;
            }
            bool flag2 = this._criteriaMethod == SqlClientUploadStreamProvider.CriteriaMethod.Custom;

            if (flag2)
            {
                this._criteriaGenerator = (ConfigurationHashThread.CreateInstance(configuration["criteriaGenerator"], new object[]
                {
                    configuration
                }) as ICriteriaGenerator);
                bool flag3 = this._criteriaGenerator == null;
                if (flag3)
                {
                    throw new ApplicationException("无法对CriteriaGenerator进行实例化.");
                }
            }
            this._connectionString = configuration["connectionString"];
            this._tablename        = configuration["table"];
            this._keyfieldname     = configuration["keyField"];
            this._dataField        = configuration["dataField"];
            this._filenamefield    = configuration["fileNameField"];
        }
Exemple #2
0
        public FileUploadStreamProvider(NameValueConfigurationSection configuration)
        {
            this._location = configuration["location"];
            bool flag = this._location == null;

            if (flag)
            {
                throw new ApplicationException();
            }
            bool flag2 = !Path.IsPathRooted(this._location);

            if (flag2)
            {
                this._location = HttpContext.Current.Server.MapPath(this._location);
            }
            string text  = configuration["existingAction"];
            bool   flag3 = text != null && text.Length != 0;

            if (flag3)
            {
                this._existingAction = (FileUploadStreamProvider.ExistingAction)Enum.Parse(typeof(FileUploadStreamProvider.ExistingAction), text, true);
            }
            else
            {
                this._existingAction = FileUploadStreamProvider.ExistingAction.Exception;
            }
            string text2 = configuration["fileNameMethod"];
            bool   flag4 = text2 != null && text2.Length != 0;

            if (flag4)
            {
                this._fileNameMethod = (FileUploadStreamProvider.FileNameMethod)Enum.Parse(typeof(FileUploadStreamProvider.FileNameMethod), text2, true);
            }
            else
            {
                this._fileNameMethod = FileUploadStreamProvider.FileNameMethod.Client;
            }
            bool flag5 = this._fileNameMethod == FileUploadStreamProvider.FileNameMethod.Custom;

            if (flag5)
            {
                this._fileNameGenerator = (ConfigurationHashThread.CreateInstance(configuration["fileNameGenerator"], new object[]
                {
                    configuration
                }) as IFileNameGenerator);
                bool flag6 = this._fileNameGenerator == null;
                if (flag6)
                {
                    throw new ApplicationException("无法对FileNameGenerator进行实例化.");
                }
            }
        }
 public SqlClientStatusManager(NameValueConfigurationSection configuration)
 {
     this._connectionString = configuration["connectionString"];
     this._tablename        = configuration["table"];
     this._keyfieldname     = configuration["keyField"];
     this._statusfield      = configuration["statusField"];
     this._lastUpdatedField = configuration["lastUpdatedField"];
     UploadLog.Log("Using SqlClientStatusManager. Settings:");
     UploadLog.Log("connectionString: " + this._connectionString);
     UploadLog.Log("table: " + this._tablename);
     UploadLog.Log("keyField: " + this._keyfieldname);
     UploadLog.Log("statusField: " + this._statusfield);
     UploadLog.Log("lastUpdatedField: " + this._lastUpdatedField);
     UploadLog.Log("updateInterval: " + UtoUploadConfiguration.StatusManager.UpdateInterval.ToString());
 }
        internal NameValueConfigurationSection(NameValueConfigurationSection parent, XmlNode section)
        {
            bool flag = parent == null;

            if (flag)
            {
                this._namevalue = new Dictionary <string, string>(StringComparer.InvariantCultureIgnoreCase);
            }
            else
            {
                this._namevalue = new Dictionary <string, string>(parent._namevalue, StringComparer.InvariantCultureIgnoreCase);
            }
            bool flag2 = section != null;

            if (flag2)
            {
                foreach (XmlAttribute attribute in section.Attributes)
                {
                    this._namevalue[attribute.Name] = attribute.Value;
                }
            }
        }
 internal StatusManagerConfigurationSection(NameValueConfigurationSection parent, XmlNode section) : base(parent, section)
 {
 }
 public ApplicationStateStatusManager(NameValueConfigurationSection configuration)
 {
 }