Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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; } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlSchemaSimpleContentExtension.cs
- DataGridDetailsPresenter.cs
- Opcode.cs
- ItemsPresenter.cs
- BrushValueSerializer.cs
- HttpsChannelFactory.cs
- PointHitTestResult.cs
- PointLightBase.cs
- IconHelper.cs
- ConfigurationConverterBase.cs
- MonthCalendar.cs
- DataErrorValidationRule.cs
- FlowLayoutPanel.cs
- Relationship.cs
- SByte.cs
- FreezableCollection.cs
- DirectoryGroupQuery.cs
- X509Utils.cs
- IndexerNameAttribute.cs
- SerializationException.cs
- ZipIOExtraFieldZip64Element.cs
- AuthenticateEventArgs.cs
- TraceListener.cs
- AssemblyAssociatedContentFileAttribute.cs
- ISessionStateStore.cs
- ReflectEventDescriptor.cs
- MaterialGroup.cs
- HuffModule.cs
- BaseResourcesBuildProvider.cs
- TransportBindingElementImporter.cs
- Activator.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- EventHandlerService.cs
- ActivationServices.cs
- DataBindingValueUIHandler.cs
- TextParaClient.cs
- AnonymousIdentificationSection.cs
- CharAnimationBase.cs
- BamlTreeUpdater.cs
- TextServicesLoader.cs
- SamlConditions.cs
- ListenerConfig.cs
- ValueChangedEventManager.cs
- RegexCharClass.cs
- OdbcCommandBuilder.cs
- FilterableAttribute.cs
- QilList.cs
- XmlSchemas.cs
- ZoneMembershipCondition.cs
- versioninfo.cs
- XsdDateTime.cs
- UrlMapping.cs
- MimeFormatter.cs
- XmlSchemaExternal.cs
- DragStartedEventArgs.cs
- Int32CollectionConverter.cs
- RegexInterpreter.cs
- CqlLexer.cs
- CaseKeyBox.xaml.cs
- DefaultTraceListener.cs
- ClientApiGenerator.cs
- XmlChoiceIdentifierAttribute.cs
- Shape.cs
- CanonicalFontFamilyReference.cs
- VersionedStream.cs
- ConfigurationCollectionAttribute.cs
- XmlValidatingReader.cs
- RouteValueDictionary.cs
- EntityContainerEntitySet.cs
- HttpApplicationFactory.cs
- _HTTPDateParse.cs
- PermissionRequestEvidence.cs
- HtmlInputText.cs
- Adorner.cs
- NonSerializedAttribute.cs
- ProfileInfo.cs
- RenderDataDrawingContext.cs
- TempEnvironment.cs
- RegexStringValidator.cs
- ModelVisual3D.cs
- ConvertEvent.cs
- DataGridViewControlCollection.cs
- UnsafeNativeMethods.cs
- CodeDOMUtility.cs
- WorkflowItemsPresenter.cs
- HatchBrush.cs
- Compiler.cs
- ElementHostPropertyMap.cs
- VectorAnimationUsingKeyFrames.cs
- Assembly.cs
- COM2Enum.cs
- EndPoint.cs
- Action.cs
- NominalTypeEliminator.cs
- CustomLineCap.cs
- MemoryStream.cs
- MouseButton.cs
- SecurityCookieModeValidator.cs
- FreezableCollection.cs
- ManagedWndProcTracker.cs