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
- XmlNullResolver.cs
- LiteralTextParser.cs
- FacetValues.cs
- LineInfo.cs
- documentsequencetextview.cs
- SqlInfoMessageEvent.cs
- TdsParserSafeHandles.cs
- ItemCollection.cs
- SqlCommandAsyncResult.cs
- _Semaphore.cs
- TableCell.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- SqlCommand.cs
- TokenBasedSet.cs
- OrderedDictionary.cs
- ActivityValidator.cs
- InputGestureCollection.cs
- OutputCache.cs
- PageOrientation.cs
- BamlWriter.cs
- ContainerTracking.cs
- TextReader.cs
- ByValueEqualityComparer.cs
- SslStream.cs
- CompilerTypeWithParams.cs
- RegexBoyerMoore.cs
- MsmqEncryptionAlgorithm.cs
- CodeGen.cs
- ModifyActivitiesPropertyDescriptor.cs
- SortedDictionary.cs
- SoapTransportImporter.cs
- PrivilegedConfigurationManager.cs
- DescendentsWalkerBase.cs
- WindowsFont.cs
- QueryAccessibilityHelpEvent.cs
- WebPartCatalogCloseVerb.cs
- GridViewRowEventArgs.cs
- SizeFConverter.cs
- CompositeFontParser.cs
- StylusPointCollection.cs
- BooleanToVisibilityConverter.cs
- ControlCachePolicy.cs
- Rotation3DAnimationUsingKeyFrames.cs
- base64Transforms.cs
- HierarchicalDataBoundControl.cs
- ControlCachePolicy.cs
- UserValidatedEventArgs.cs
- MenuItem.cs
- DateTime.cs
- TypeReference.cs
- keycontainerpermission.cs
- XPathException.cs
- XmlUTF8TextWriter.cs
- ControlHelper.cs
- NativeMethods.cs
- CatalogPartDesigner.cs
- MessageSecurityOverMsmqElement.cs
- DocumentXmlWriter.cs
- TextDecorations.cs
- VoiceObjectToken.cs
- ReadOnlyCollection.cs
- PropertyCollection.cs
- XmlSchemaSimpleContent.cs
- NullableFloatMinMaxAggregationOperator.cs
- TextViewSelectionProcessor.cs
- TemplateXamlParser.cs
- StickyNoteContentControl.cs
- GeneralTransform.cs
- Emitter.cs
- DeploymentExceptionMapper.cs
- RowsCopiedEventArgs.cs
- RemoteWebConfigurationHost.cs
- BamlRecordHelper.cs
- SerialErrors.cs
- EventsTab.cs
- ActiveXHost.cs
- BitmapEffectGroup.cs
- WSSecurityOneDotZeroSendSecurityHeader.cs
- ConstraintManager.cs
- Calendar.cs
- ImageButton.cs
- GridViewCommandEventArgs.cs
- XmlBindingWorker.cs
- ComboBoxRenderer.cs
- DesigntimeLicenseContext.cs
- XmlArrayItemAttributes.cs
- Focus.cs
- EventLogPropertySelector.cs
- UIElementPropertyUndoUnit.cs
- oledbconnectionstring.cs
- DataSvcMapFile.cs
- Module.cs
- KeyProperty.cs
- EditorZoneBase.cs
- DelegateSerializationHolder.cs
- PasswordTextContainer.cs
- SignatureResourceHelper.cs
- SqlReorderer.cs
- EnumConverter.cs
- ConfigurationPermission.cs