Code:
/ FX-1434 / FX-1434 / 1.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
- WebHttpEndpoint.cs
- SmtpNetworkElement.cs
- DynamicObjectAccessor.cs
- ConstrainedGroup.cs
- DataGridView.cs
- basecomparevalidator.cs
- CollectionType.cs
- CompiledWorkflowDefinitionContext.cs
- MediaTimeline.cs
- DbProviderSpecificTypePropertyAttribute.cs
- StackBuilderSink.cs
- MemoryMappedFile.cs
- FieldBuilder.cs
- StyleCollection.cs
- CompatibleComparer.cs
- Mapping.cs
- ResourceCodeDomSerializer.cs
- ExpressionTable.cs
- Attribute.cs
- StrokeNodeEnumerator.cs
- CryptoApi.cs
- ColorBlend.cs
- XmlTypeAttribute.cs
- Tablet.cs
- DesignerVerb.cs
- MapPathBasedVirtualPathProvider.cs
- Domain.cs
- DurableServiceAttribute.cs
- xmlglyphRunInfo.cs
- FileUpload.cs
- SynchronizationLockException.cs
- TemplateColumn.cs
- RadioButtonPopupAdapter.cs
- DiscoveryClientBindingElement.cs
- WindowsListBox.cs
- TextProviderWrapper.cs
- Composition.cs
- COM2PropertyDescriptor.cs
- ImageMap.cs
- RuntimeHelpers.cs
- SymLanguageVendor.cs
- DbParameterCollection.cs
- DataKeyCollection.cs
- InfoCardKeyedHashAlgorithm.cs
- ItemCheckEvent.cs
- IISUnsafeMethods.cs
- WsdlBuildProvider.cs
- CharacterMetricsDictionary.cs
- RenderingEventArgs.cs
- FontFamilyIdentifier.cs
- NamespaceList.cs
- ConditionalAttribute.cs
- FreezableOperations.cs
- TableStyle.cs
- PluralizationServiceUtil.cs
- DynamicUpdateCommand.cs
- VirtualDirectoryMappingCollection.cs
- DataKey.cs
- PackageDigitalSignature.cs
- XmlUrlResolver.cs
- ServerIdentity.cs
- Paragraph.cs
- PropertyOverridesTypeEditor.cs
- XmlAttributeAttribute.cs
- XmlQueryOutput.cs
- SecurityRuntime.cs
- PolyLineSegment.cs
- Parsers.cs
- XmlValidatingReader.cs
- DBDataPermission.cs
- DataServiceStreamResponse.cs
- PageThemeCodeDomTreeGenerator.cs
- TransformGroup.cs
- LayoutTable.cs
- LayoutTableCell.cs
- HttpRuntime.cs
- Decimal.cs
- VBIdentifierName.cs
- PackWebRequestFactory.cs
- DefaultTraceListener.cs
- SymDocumentType.cs
- TextBoxAutoCompleteSourceConverter.cs
- SafeNativeMethods.cs
- Zone.cs
- Selector.cs
- NetDataContractSerializer.cs
- precedingquery.cs
- SymbolType.cs
- ApplicationId.cs
- SystemResources.cs
- ShaderRenderModeValidation.cs
- PersonalizationProvider.cs
- WebPartManager.cs
- XslNumber.cs
- FormsAuthenticationEventArgs.cs
- FixUpCollection.cs
- AdvancedBindingPropertyDescriptor.cs
- AmbientLight.cs
- TimelineCollection.cs
- ClientTargetCollection.cs