Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- IisTraceWebEventProvider.cs
- CustomWebEventKey.cs
- ThreadStateException.cs
- TextEffectCollection.cs
- DictionarySectionHandler.cs
- PrintDialog.cs
- _TimerThread.cs
- ClientRolePrincipal.cs
- LeaseManager.cs
- SqlCacheDependency.cs
- FontSourceCollection.cs
- CodeSubDirectory.cs
- IteratorFilter.cs
- CompilerCollection.cs
- HtmlTextArea.cs
- SelectionPattern.cs
- CodeEventReferenceExpression.cs
- ControllableStoryboardAction.cs
- BasicCellRelation.cs
- ClassData.cs
- NumericUpDownAcceleration.cs
- WaitHandleCannotBeOpenedException.cs
- TextPatternIdentifiers.cs
- GroupItemAutomationPeer.cs
- ForEachDesigner.xaml.cs
- ServiceMetadataContractBehavior.cs
- Keywords.cs
- WebResourceAttribute.cs
- CodeMemberMethod.cs
- EventSinkHelperWriter.cs
- XmlSchemaImport.cs
- DateTime.cs
- DataTemplateSelector.cs
- MailMessageEventArgs.cs
- ImageButton.cs
- _LazyAsyncResult.cs
- TextElementEnumerator.cs
- ScriptControl.cs
- Int32RectConverter.cs
- UrlMapping.cs
- DocumentViewerBaseAutomationPeer.cs
- Exceptions.cs
- ProcessHostMapPath.cs
- SelectionItemProviderWrapper.cs
- PropertyEmitter.cs
- BezierSegment.cs
- NTAccount.cs
- TextBox.cs
- precedingsibling.cs
- HttpConfigurationSystem.cs
- DataView.cs
- SortedSet.cs
- FieldToken.cs
- EventHandlersDesigner.cs
- ChannelSinkStacks.cs
- BadImageFormatException.cs
- Empty.cs
- WpfWebRequestHelper.cs
- RuleInfoComparer.cs
- Nodes.cs
- EntityParameter.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- LinkTarget.cs
- RtfControlWordInfo.cs
- TypefaceCollection.cs
- StyleCollection.cs
- PropertyChangingEventArgs.cs
- XhtmlConformanceSection.cs
- ServiceDescriptionReflector.cs
- ProviderConnectionPoint.cs
- MenuEventArgs.cs
- MethodCallTranslator.cs
- AppAction.cs
- NetTcpBindingElement.cs
- ListenerServiceInstallComponent.cs
- LayoutTable.cs
- PartitionResolver.cs
- ExpressionWriter.cs
- MetadataItemEmitter.cs
- LogManagementAsyncResult.cs
- SqlUserDefinedAggregateAttribute.cs
- SpecialTypeDataContract.cs
- StylusTip.cs
- XmlSecureResolver.cs
- PersonalizationStateInfo.cs
- Geometry.cs
- FormViewPageEventArgs.cs
- UpdatePanel.cs
- XNodeValidator.cs
- WorkflowDefinitionDispenser.cs
- ErrorRuntimeConfig.cs
- EditingScopeUndoUnit.cs
- VirtualDirectoryMapping.cs
- PermissionListSet.cs
- ListDataHelper.cs
- DynamicResourceExtensionConverter.cs
- infer.cs
- OpenTypeLayoutCache.cs
- OptimalTextSource.cs
- CharacterMetrics.cs