Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / UI / UrlPropertyAttribute.cs / 1 / UrlPropertyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; using System.Security.Permissions; using System.Web.Util; // An UrlPropertyAttribute metadata attribute can be applied to string // properties that contain URL values. // This can be used to identify URLs which allows design-time functionality and runtime // functionality to do interesting things with the property values. [AttributeUsage(AttributeTargets.Property)] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class UrlPropertyAttribute : Attribute { private string _filter; // Used to mark a property as an URL. public UrlPropertyAttribute() : this("*.*") { } // Used to mark a property as an URL. In addition, the type of files allowed // can be specified. This can be used at design-time to customize the URL picker. public UrlPropertyAttribute(string filter) { if(filter == null) { _filter = "*.*"; } else { _filter = filter; } } // The file filter associated with the URL property. This takes // the form of a file filter string typically used with Open File // dialogs. The default is *.*, so all file types can be chosen. public string Filter { get { return _filter; } } public override int GetHashCode() { return Filter.GetHashCode(); } public override bool Equals(object obj) { if (obj == this) { return true; } UrlPropertyAttribute other = obj as UrlPropertyAttribute; if (other != null) { return Filter.Equals(other.Filter); } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; using System.Security.Permissions; using System.Web.Util; // An UrlPropertyAttribute metadata attribute can be applied to string // properties that contain URL values. // This can be used to identify URLs which allows design-time functionality and runtime // functionality to do interesting things with the property values. [AttributeUsage(AttributeTargets.Property)] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class UrlPropertyAttribute : Attribute { private string _filter; // Used to mark a property as an URL. public UrlPropertyAttribute() : this("*.*") { } // Used to mark a property as an URL. In addition, the type of files allowed // can be specified. This can be used at design-time to customize the URL picker. public UrlPropertyAttribute(string filter) { if(filter == null) { _filter = "*.*"; } else { _filter = filter; } } // The file filter associated with the URL property. This takes // the form of a file filter string typically used with Open File // dialogs. The default is *.*, so all file types can be chosen. public string Filter { get { return _filter; } } public override int GetHashCode() { return Filter.GetHashCode(); } public override bool Equals(object obj) { if (obj == this) { return true; } UrlPropertyAttribute other = obj as UrlPropertyAttribute; if (other != null) { return Filter.Equals(other.Filter); } return false; } } } // 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
- Lasso.cs
- StorageAssociationSetMapping.cs
- SystemResourceHost.cs
- login.cs
- SQLBytes.cs
- ContainerUIElement3D.cs
- EntityDataSourceContextDisposingEventArgs.cs
- ObjectViewQueryResultData.cs
- WebServiceEndpoint.cs
- SqlTriggerContext.cs
- OleDbEnumerator.cs
- MissingMemberException.cs
- CacheAxisQuery.cs
- HMACSHA384.cs
- FocusWithinProperty.cs
- IndependentAnimationStorage.cs
- PersonalizationDictionary.cs
- DbTransaction.cs
- AttributedMetaModel.cs
- TemplatePagerField.cs
- MDIWindowDialog.cs
- SqlCommand.cs
- FileChangesMonitor.cs
- TrackingExtract.cs
- TemplateControlParser.cs
- PropertyChangedEventArgs.cs
- ContentElement.cs
- Span.cs
- MenuCommand.cs
- CatalogPartCollection.cs
- Base64Decoder.cs
- TimersDescriptionAttribute.cs
- ConfigurationStrings.cs
- EntitySet.cs
- NullExtension.cs
- SerializationInfo.cs
- NameTable.cs
- TraceHandler.cs
- TextServicesLoader.cs
- NominalTypeEliminator.cs
- ColorAnimationUsingKeyFrames.cs
- Process.cs
- NullRuntimeConfig.cs
- SmtpReplyReader.cs
- InternalMappingException.cs
- ProtocolViolationException.cs
- RequiredAttributeAttribute.cs
- XmlTextWriter.cs
- PolicyDesigner.cs
- SqlRowUpdatingEvent.cs
- BrushConverter.cs
- List.cs
- XmlSignificantWhitespace.cs
- FrameSecurityDescriptor.cs
- ReferenceEqualityComparer.cs
- Lazy.cs
- SemaphoreFullException.cs
- RestrictedTransactionalPackage.cs
- FontStretchConverter.cs
- MarkupObject.cs
- DataTemplateSelector.cs
- TemplateNodeContextMenu.cs
- XmlSerializerObjectSerializer.cs
- RequestContext.cs
- ApplyHostConfigurationBehavior.cs
- CompressionTracing.cs
- TdsParserSafeHandles.cs
- ValueProviderWrapper.cs
- StylusTip.cs
- FileSystemEventArgs.cs
- Sequence.cs
- XmlObjectSerializerReadContext.cs
- GreaterThan.cs
- SQLInt32Storage.cs
- DrawingGroup.cs
- GetLastErrorDetailsRequest.cs
- SmiEventSink.cs
- PerformanceCounterScope.cs
- ClientUtils.cs
- MissingFieldException.cs
- XmlnsCache.cs
- DependencyPropertyHelper.cs
- HyperLinkColumn.cs
- PageThemeCodeDomTreeGenerator.cs
- SqlCrossApplyToCrossJoin.cs
- MonthCalendar.cs
- SmtpReplyReaderFactory.cs
- FixedTextPointer.cs
- Console.cs
- DetailsViewInsertEventArgs.cs
- PanelStyle.cs
- PointAnimationUsingPath.cs
- HMACSHA256.cs
- RtfFormatStack.cs
- AtlasWeb.Designer.cs
- UnsafeNativeMethodsCLR.cs
- Site.cs
- ReachPageContentCollectionSerializerAsync.cs
- BinaryObjectReader.cs
- MDIControlStrip.cs