Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Server / System / Data / Services / SingleResultAttribute.cs / 1305376 / SingleResultAttribute.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Provides a class to decorate custom service operations with // a single-result attribute. // // // @owner [....] //--------------------------------------------------------------------- namespace System.Data.Services { using System; using System.Diagnostics; using System.Reflection; ////// Use this attribute on a DataService service operation method /// to indicate than the IQueryable returned should contain a single element. /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)] public sealed class SingleResultAttribute : Attribute { ///Declares a new public SingleResultAttribute() { } ///instance. Checks whether the specified method has a SingleResultAttribute declared on it. /// Method to check. ////// true if the specified method (in its declared type or in an /// ancestor declaring the type) has the SingleResultAttribute set. /// internal static bool MethodHasSingleResult(MethodInfo method) { Debug.Assert(method != null, "method != null"); return method.GetCustomAttributes(typeof(SingleResultAttribute), true).Length > 0; } } } // 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
- ResourceManager.cs
- ConfigXmlSignificantWhitespace.cs
- OleDbReferenceCollection.cs
- WindowShowOrOpenTracker.cs
- DrawingCollection.cs
- Mapping.cs
- FontFamilyIdentifier.cs
- PassportAuthentication.cs
- WindowsListViewSubItem.cs
- ManagementNamedValueCollection.cs
- RotateTransform3D.cs
- DataPagerCommandEventArgs.cs
- DataRow.cs
- XmlDataSourceNodeDescriptor.cs
- TaskFormBase.cs
- AuthorizationRule.cs
- ClientSession.cs
- ContextMenu.cs
- CodeDomDecompiler.cs
- ListDictionaryInternal.cs
- X509Utils.cs
- AsymmetricSignatureDeformatter.cs
- DescendentsWalker.cs
- RawUIStateInputReport.cs
- HideDisabledControlAdapter.cs
- WindowInteractionStateTracker.cs
- DataRowChangeEvent.cs
- ClientUtils.cs
- FeatureManager.cs
- PerfCounters.cs
- SQLDecimal.cs
- ProgressBarAutomationPeer.cs
- CharacterBuffer.cs
- SerializationException.cs
- RelationalExpressions.cs
- XmlSchemaNotation.cs
- Listbox.cs
- ActivationArguments.cs
- OptionalColumn.cs
- AuthenticatingEventArgs.cs
- URLIdentityPermission.cs
- DataServiceRequestException.cs
- DataBinder.cs
- CounterSetInstance.cs
- HostProtectionPermission.cs
- Tag.cs
- XmlSchemaExporter.cs
- HtmlInputFile.cs
- processwaithandle.cs
- ComboBoxRenderer.cs
- ByteStorage.cs
- ErrorWebPart.cs
- Msec.cs
- ObfuscationAttribute.cs
- ViewPort3D.cs
- xdrvalidator.cs
- TreeChangeInfo.cs
- BulletChrome.cs
- TextPenaltyModule.cs
- EntityWithChangeTrackerStrategy.cs
- PanelStyle.cs
- TrackingServices.cs
- SqlConnection.cs
- ContractListAdapter.cs
- SettingsProperty.cs
- CharacterHit.cs
- SqlServer2KCompatibilityAnnotation.cs
- CdpEqualityComparer.cs
- ExtendLockCommand.cs
- ChildChangedEventArgs.cs
- BindingExpressionBase.cs
- XamlSerializerUtil.cs
- XPathMessageFilterTable.cs
- AmbientLight.cs
- GeneralTransform3D.cs
- MarkupWriter.cs
- XamlDesignerSerializationManager.cs
- TableItemPattern.cs
- AssemblyGen.cs
- PartialCachingAttribute.cs
- CachedFontFamily.cs
- BatchParser.cs
- BuildManagerHost.cs
- XmlReflectionImporter.cs
- SiteMapNodeItemEventArgs.cs
- BigInt.cs
- Condition.cs
- Constants.cs
- DataProtection.cs
- KeyedByTypeCollection.cs
- FreezableOperations.cs
- BitmapCodecInfoInternal.cs
- ReaderContextStackData.cs
- DataListItemCollection.cs
- UserControlAutomationPeer.cs
- Calendar.cs
- InvalidOleVariantTypeException.cs
- Clipboard.cs
- CompositeCollectionView.cs
- AttachedProperty.cs