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
- SecurityChannelListener.cs
- ImageMap.cs
- EntityDataSourceContainerNameItem.cs
- DocumentSchemaValidator.cs
- ISFTagAndGuidCache.cs
- TextReturnReader.cs
- RemoteWebConfigurationHost.cs
- VisualCollection.cs
- Interlocked.cs
- ReadOnlyTernaryTree.cs
- ScrollableControl.cs
- DocumentSignatureManager.cs
- OleStrCAMarshaler.cs
- TextMetrics.cs
- __FastResourceComparer.cs
- SchemaInfo.cs
- XPathItem.cs
- DataGridRow.cs
- StringComparer.cs
- PackageFilter.cs
- Window.cs
- CompositeCollection.cs
- WarningException.cs
- OperationResponse.cs
- CompressionTransform.cs
- Substitution.cs
- StylusPointProperties.cs
- FlowLayoutPanel.cs
- ValueChangedEventManager.cs
- QuotedStringFormatReader.cs
- UnknownBitmapDecoder.cs
- OdbcErrorCollection.cs
- EqualityComparer.cs
- HostedBindingBehavior.cs
- CommonDialog.cs
- OracleNumber.cs
- ResourceType.cs
- Object.cs
- ConnectionManagementSection.cs
- ParserContext.cs
- DemultiplexingClientMessageFormatter.cs
- _AuthenticationState.cs
- MediaTimeline.cs
- XamlFilter.cs
- TableProviderWrapper.cs
- DesignSurface.cs
- ProgressPage.cs
- FilePrompt.cs
- EntityDataSourceDataSelection.cs
- PublishLicense.cs
- Context.cs
- Button.cs
- MobileListItem.cs
- SafeThreadHandle.cs
- SafeCryptContextHandle.cs
- StylusShape.cs
- Image.cs
- PasswordPropertyTextAttribute.cs
- RequestCachingSection.cs
- ToggleButton.cs
- IntSecurity.cs
- ZoneButton.cs
- ThrowHelper.cs
- ToggleProviderWrapper.cs
- TableCell.cs
- EtwProvider.cs
- PassportIdentity.cs
- DurableOperationAttribute.cs
- ConstructorBuilder.cs
- BamlRecordReader.cs
- SynchronizedPool.cs
- HttpValueCollection.cs
- File.cs
- IdentifierCollection.cs
- FlowDocumentPaginator.cs
- ReversePositionQuery.cs
- SecurityPolicySection.cs
- WebPartDescription.cs
- TraceHandler.cs
- SystemIcmpV4Statistics.cs
- AuthorizationRuleCollection.cs
- FileDialogCustomPlacesCollection.cs
- WebScriptEnablingBehavior.cs
- TraceContextEventArgs.cs
- DebugControllerThread.cs
- ImageSourceValueSerializer.cs
- smtpconnection.cs
- SessionState.cs
- StorageInfo.cs
- MarginsConverter.cs
- PartialArray.cs
- TemplatedMailWebEventProvider.cs
- ToolStripOverflowButton.cs
- HostingEnvironmentSection.cs
- AlphaSortedEnumConverter.cs
- SafeBitVector32.cs
- SqlDataSourceQueryConverter.cs
- XmlBaseReader.cs
- SignatureToken.cs
- DataGridViewHeaderCell.cs