Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / tx / System / Transactions / Configuration / MachineSettingsSection.cs / 1305376 / MachineSettingsSection.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Transactions.Configuration { using System.Configuration; using System.Collections.Generic; using System.Globalization; public sealed class MachineSettingsSection : ConfigurationSection { public MachineSettingsSection() : base() { } // System.Transactions reads the Configuration information in a non destructive way. static internal MachineSettingsSection GetSection() { MachineSettingsSection retval = (MachineSettingsSection)PrivilegedConfigurationManager.GetSection(ConfigurationStrings.MachineSettingsSectionPath); if (retval == null) { throw new ConfigurationErrorsException(string.Format(CultureInfo.CurrentCulture, SR.GetString(SR.ConfigurationSectionNotFound), ConfigurationStrings.MachineSettingsSectionPath)); } return retval; } // public properties [ConfigurationProperty(ConfigurationStrings.MaxTimeout, DefaultValue=ConfigurationStrings.DefaultMaxTimeout)] [TimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanZero, MaxValueString=TimeSpanValidatorAttribute.TimeSpanMaxValue)] public TimeSpan MaxTimeout { // System.Transactions reads the Configuration information in a non destructive way. get { return (TimeSpan)base[ConfigurationStrings.MaxTimeout];} set { if (!ConfigurationStrings.IsValidTimeSpan(value)) { throw new ArgumentOutOfRangeException("MaxTimeout", SR.GetString(SR.ConfigInvalidTimeSpanValue)); } base[ConfigurationStrings.MaxTimeout] = value; } } protected override ConfigurationPropertyCollection Properties { get { ConfigurationPropertyCollection retval = new ConfigurationPropertyCollection(); retval.Add(new ConfigurationProperty( ConfigurationStrings.MaxTimeout, typeof(TimeSpan), ConfigurationStrings.DefaultMaxTimeout, null, new TimeSpanValidator( TimeSpan.Zero, TimeSpan.MaxValue ), ConfigurationPropertyOptions.None)); return retval; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InstanceCollisionException.cs
- CallSite.cs
- EventLogSession.cs
- ClearTypeHintValidation.cs
- CodeGen.cs
- PathStreamGeometryContext.cs
- PropertyGridView.cs
- DynamicControlParameter.cs
- ScaleTransform3D.cs
- Int64AnimationUsingKeyFrames.cs
- HttpModule.cs
- OdbcConnectionPoolProviderInfo.cs
- Monitor.cs
- TablePatternIdentifiers.cs
- XPathNavigatorKeyComparer.cs
- FontInfo.cs
- BooleanAnimationBase.cs
- MaskInputRejectedEventArgs.cs
- SqlDataSource.cs
- Int16KeyFrameCollection.cs
- DockPanel.cs
- ObjRef.cs
- MetadataPropertyvalue.cs
- ExpressionDumper.cs
- ButtonBase.cs
- LocatorManager.cs
- ProfileWorkflowElement.cs
- SubMenuStyleCollection.cs
- HandledMouseEvent.cs
- XmlLanguage.cs
- Int64Storage.cs
- SqlTypesSchemaImporter.cs
- WpfKnownMemberInvoker.cs
- CellQuery.cs
- InvalidFilterCriteriaException.cs
- FrugalMap.cs
- OutputScope.cs
- RequestCache.cs
- EntityException.cs
- RequestResizeEvent.cs
- ToolboxComponentsCreatingEventArgs.cs
- AttributeProviderAttribute.cs
- IISMapPath.cs
- DetailsViewPagerRow.cs
- ButtonChrome.cs
- XmlChoiceIdentifierAttribute.cs
- LogicalChannelCollection.cs
- ToolStripContentPanel.cs
- PermissionToken.cs
- MissingMemberException.cs
- MarshalDirectiveException.cs
- EntityTransaction.cs
- CheckBoxFlatAdapter.cs
- ImageBrush.cs
- DbInsertCommandTree.cs
- StylusTip.cs
- XmlQueryRuntime.cs
- StaticFileHandler.cs
- XmlSchemaAppInfo.cs
- OptimalBreakSession.cs
- RuleInfoComparer.cs
- HiddenFieldPageStatePersister.cs
- TreeNodeCollection.cs
- TextEditorMouse.cs
- SQLStringStorage.cs
- WorkflowMarkupSerializationManager.cs
- RequestUriProcessor.cs
- XmlLoader.cs
- AudioFormatConverter.cs
- BitmapSourceSafeMILHandle.cs
- AnimationClockResource.cs
- DBCSCodePageEncoding.cs
- GenericEnumerator.cs
- DataGridViewComboBoxCell.cs
- SqlDataReaderSmi.cs
- NoResizeSelectionBorderGlyph.cs
- TextReader.cs
- SoapSchemaImporter.cs
- DefaultProxySection.cs
- MailWebEventProvider.cs
- SQLDoubleStorage.cs
- DataTableMapping.cs
- WebRequestModulesSection.cs
- SQLDoubleStorage.cs
- BitmapEffectDrawing.cs
- ValidatorCollection.cs
- HtmlImage.cs
- PlaceHolder.cs
- LocalizationParserHooks.cs
- BooleanSwitch.cs
- SafeFileMapViewHandle.cs
- CheckBoxField.cs
- OutputScope.cs
- ValueOfAction.cs
- ChtmlTextBoxAdapter.cs
- _SSPISessionCache.cs
- URL.cs
- XmlRootAttribute.cs
- TimeZone.cs
- EntitySqlException.cs