Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataWeb / Server / System / Data / Services / SingleResultAttribute.cs / 1 / 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. //---------------------------------------------------------------------- //// 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
- IndentedWriter.cs
- DelegateHelpers.Generated.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- ManifestBasedResourceGroveler.cs
- AnonymousIdentificationModule.cs
- ImageDrawing.cs
- HiddenField.cs
- Rule.cs
- StrongName.cs
- PageVisual.cs
- EntityException.cs
- DataGridParentRows.cs
- xmlsaver.cs
- UnsafePeerToPeerMethods.cs
- HexParser.cs
- TextRunCacheImp.cs
- GeneralTransform2DTo3DTo2D.cs
- BinaryConverter.cs
- PixelFormats.cs
- XmlHierarchicalDataSourceView.cs
- Pointer.cs
- BrowserCapabilitiesCodeGenerator.cs
- SerialPinChanges.cs
- DefaultWorkflowTransactionService.cs
- SspiWrapper.cs
- ConfigurationLockCollection.cs
- ConstNode.cs
- TrailingSpaceComparer.cs
- StringAnimationUsingKeyFrames.cs
- TypedReference.cs
- DataRelationPropertyDescriptor.cs
- DataGridViewCellLinkedList.cs
- TypeRestriction.cs
- SqlDataSourceWizardForm.cs
- PathFigure.cs
- UpdateException.cs
- HttpListenerResponse.cs
- TripleDES.cs
- ProfileInfo.cs
- validationstate.cs
- Grid.cs
- AuthenticodeSignatureInformation.cs
- PeerApplication.cs
- UTF7Encoding.cs
- BooleanAnimationBase.cs
- UpdateTracker.cs
- ValidationErrorEventArgs.cs
- StatusBarItemAutomationPeer.cs
- WebExceptionStatus.cs
- KeyConstraint.cs
- GestureRecognizer.cs
- ActiveDocumentEvent.cs
- RecognitionResult.cs
- DocComment.cs
- DataIdProcessor.cs
- webproxy.cs
- SqlErrorCollection.cs
- CompiledIdentityConstraint.cs
- HyperLinkColumn.cs
- SeekableReadStream.cs
- SurrogateSelector.cs
- PointCollection.cs
- XsdBuilder.cs
- VideoDrawing.cs
- _HeaderInfoTable.cs
- MediaPlayer.cs
- CompiledQueryCacheKey.cs
- _ServiceNameStore.cs
- AndCondition.cs
- XmlReflectionMember.cs
- ToolStripTextBox.cs
- SwitchLevelAttribute.cs
- SqlPersonalizationProvider.cs
- AutoResizedEvent.cs
- AnnotationAuthorChangedEventArgs.cs
- SiteMapPath.cs
- IChannel.cs
- Hyperlink.cs
- HandledEventArgs.cs
- ColumnTypeConverter.cs
- BinarySerializer.cs
- LoadedOrUnloadedOperation.cs
- DispatchWrapper.cs
- SignatureToken.cs
- HtmlElement.cs
- XmlNamespaceMappingCollection.cs
- RadioButtonPopupAdapter.cs
- GeneralTransformGroup.cs
- KnowledgeBase.cs
- FontInfo.cs
- BamlLocalizableResource.cs
- DataSetViewSchema.cs
- XmlAttributes.cs
- Menu.cs
- StatusBar.cs
- NavigationProgressEventArgs.cs
- IdentityManager.cs
- Reference.cs
- DateTimeSerializationSection.cs
- MenuItemCollection.cs