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
- PlanCompiler.cs
- PropertyToken.cs
- HeaderUtility.cs
- DocumentSignatureManager.cs
- ScaleTransform.cs
- AccessControlList.cs
- NetworkStream.cs
- MethodImplAttribute.cs
- CategoryNameCollection.cs
- DataMemberListEditor.cs
- Span.cs
- Interlocked.cs
- HttpStreamFormatter.cs
- ZoneMembershipCondition.cs
- DictionaryEditChange.cs
- WhitespaceRuleReader.cs
- ResizeGrip.cs
- Transform3D.cs
- codemethodreferenceexpression.cs
- UrlMappingsSection.cs
- MinMaxParagraphWidth.cs
- SetIndexBinder.cs
- KnowledgeBase.cs
- UserPreferenceChangingEventArgs.cs
- AxHostDesigner.cs
- MouseGestureConverter.cs
- Interlocked.cs
- ToolStripPanelRow.cs
- XamlGridLengthSerializer.cs
- XmlDataSourceView.cs
- HttpWebRequest.cs
- SubstitutionList.cs
- ToggleProviderWrapper.cs
- Effect.cs
- GuidConverter.cs
- CriticalFinalizerObject.cs
- SqlCachedBuffer.cs
- PartialCachingControl.cs
- Array.cs
- DataGridViewRowsAddedEventArgs.cs
- TraceListeners.cs
- HttpResponse.cs
- AssemblyBuilderData.cs
- BufferedReadStream.cs
- WebScriptEndpoint.cs
- AnimationStorage.cs
- TableLayout.cs
- CollectionConverter.cs
- WsdlBuildProvider.cs
- AdornerPresentationContext.cs
- ObjectListFieldsPage.cs
- DefaultTraceListener.cs
- Comparer.cs
- UIElementAutomationPeer.cs
- Hashtable.cs
- Part.cs
- CharacterMetrics.cs
- SystemColorTracker.cs
- SQLSingleStorage.cs
- DefaultValidator.cs
- InkPresenterAutomationPeer.cs
- HttpRequest.cs
- TextAutomationPeer.cs
- ExpressionEditorAttribute.cs
- InstalledVoice.cs
- ListItemParagraph.cs
- ToolboxSnapDragDropEventArgs.cs
- RefType.cs
- Token.cs
- CompositeFontFamily.cs
- SynchronizedChannelCollection.cs
- ObjectParameter.cs
- PasswordBox.cs
- QueryableDataSourceHelper.cs
- SafeTimerHandle.cs
- FileVersion.cs
- TableAdapterManagerMethodGenerator.cs
- ParameterCollection.cs
- HtmlLink.cs
- Attributes.cs
- X509CertificateStore.cs
- ReachSerializationUtils.cs
- DomNameTable.cs
- ReliableReplySessionChannel.cs
- XmlSchemaRedefine.cs
- WebPartConnection.cs
- ListViewSortEventArgs.cs
- ConnectionsZone.cs
- ResourceCategoryAttribute.cs
- Propagator.ExtentPlaceholderCreator.cs
- ExtractedStateEntry.cs
- LateBoundChannelParameterCollection.cs
- FontCollection.cs
- XPathNodeList.cs
- IndentedTextWriter.cs
- MimeWriter.cs
- WebRequestModuleElementCollection.cs
- HandlerMappingMemo.cs
- DiagnosticsConfigurationHandler.cs
- DbgUtil.cs