Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Messaging / System / Messaging / MessagingDescriptionAttribute.cs / 1305376 / MessagingDescriptionAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Messaging { using System; using System.ComponentModel; using System.Security.Permissions; ////// /// DescriptionAttribute marks a property, event, or extender with a /// description. Visual designers can display this description when referencing /// the member. /// [AttributeUsage(AttributeTargets.All)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] public class MessagingDescriptionAttribute : DescriptionAttribute { private bool replaced = false; ////// /// Constructs a new sys description. /// public MessagingDescriptionAttribute(string description) : base(description) { } ////// /// Retrieves the description text. /// public override string Description { [HostProtection(SharedState = true)] // DescriptionAttribute uses SharedState=true. We should not change base's behavior get { if (!replaced) { replaced = true; DescriptionValue = Res.GetString(base.Description); } return base.Description; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Messaging { using System; using System.ComponentModel; using System.Security.Permissions; ////// /// DescriptionAttribute marks a property, event, or extender with a /// description. Visual designers can display this description when referencing /// the member. /// [AttributeUsage(AttributeTargets.All)] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] public class MessagingDescriptionAttribute : DescriptionAttribute { private bool replaced = false; ////// /// Constructs a new sys description. /// public MessagingDescriptionAttribute(string description) : base(description) { } ////// /// Retrieves the description text. /// public override string Description { [HostProtection(SharedState = true)] // DescriptionAttribute uses SharedState=true. We should not change base's behavior get { if (!replaced) { replaced = true; DescriptionValue = Res.GetString(base.Description); } return base.Description; } } } } // 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
- MetadataUtilsSmi.cs
- WebPartPersonalization.cs
- ThrowHelper.cs
- ContentOperations.cs
- MailAddress.cs
- ItemMap.cs
- IsolatedStoragePermission.cs
- ProcessModelInfo.cs
- ClientProtocol.cs
- GridViewColumn.cs
- DataControlFieldCollection.cs
- PermissionAttributes.cs
- SafeArrayRankMismatchException.cs
- FieldAccessException.cs
- DockEditor.cs
- StylusPlugInCollection.cs
- StackSpiller.Bindings.cs
- Dispatcher.cs
- SafeNativeMethods.cs
- ListViewSelectEventArgs.cs
- AttributeQuery.cs
- ListBoxItemWrapperAutomationPeer.cs
- WebHttpDispatchOperationSelectorData.cs
- OdbcParameterCollection.cs
- TextRangeEdit.cs
- VoiceSynthesis.cs
- ConfigurationConverterBase.cs
- EventLogger.cs
- SystemEvents.cs
- PrincipalPermission.cs
- SchemaCreator.cs
- SimpleApplicationHost.cs
- MonthChangedEventArgs.cs
- ListControlConvertEventArgs.cs
- DeviceContext2.cs
- ElementMarkupObject.cs
- Helper.cs
- CodeMethodInvokeExpression.cs
- EventEntry.cs
- DataColumnPropertyDescriptor.cs
- FontWeight.cs
- GridToolTip.cs
- SetStateDesigner.cs
- ImageBrush.cs
- Configuration.cs
- TableRowCollection.cs
- BitSet.cs
- ServicePointManagerElement.cs
- BitmapFrame.cs
- CollectionViewProxy.cs
- CompilerInfo.cs
- DateTimeOffsetStorage.cs
- HtmlInputImage.cs
- ProfileEventArgs.cs
- BamlRecordHelper.cs
- TdsParserHelperClasses.cs
- BrowsableAttribute.cs
- XNodeValidator.cs
- ObjectQueryProvider.cs
- BaseUriHelper.cs
- _HTTPDateParse.cs
- CultureInfoConverter.cs
- GcSettings.cs
- XsdDuration.cs
- XomlCompiler.cs
- loginstatus.cs
- validationstate.cs
- GACMembershipCondition.cs
- WithStatement.cs
- CompatibleComparer.cs
- BindingNavigatorDesigner.cs
- XmlEntity.cs
- HttpsChannelFactory.cs
- DecoderExceptionFallback.cs
- ToolStripRenderEventArgs.cs
- XmlSignatureProperties.cs
- WCFBuildProvider.cs
- ToolStripItemClickedEventArgs.cs
- RoleBoolean.cs
- StickyNote.cs
- InkCanvas.cs
- HttpHandlerAction.cs
- ManagementOperationWatcher.cs
- SqlIdentifier.cs
- Triplet.cs
- HtmlElement.cs
- DefaultDiscoveryServiceExtension.cs
- ColorTransformHelper.cs
- _NegoState.cs
- CodeTypeReferenceCollection.cs
- SoapBinding.cs
- DoubleAnimationClockResource.cs
- Section.cs
- HyperlinkAutomationPeer.cs
- TextBox.cs
- WebControlAdapter.cs
- ListManagerBindingsCollection.cs
- DocumentNUp.cs
- StubHelpers.cs
- DLinqDataModelProvider.cs