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
- EnumType.cs
- SynchronizationLockException.cs
- PKCS1MaskGenerationMethod.cs
- Base64Encoder.cs
- CommandID.cs
- XmlSchemaInfo.cs
- BitmapEffectGroup.cs
- XmlLinkedNode.cs
- QueryGenerator.cs
- QueryContinueDragEvent.cs
- ObjectCacheSettings.cs
- BufferedGraphics.cs
- StylusPointCollection.cs
- DetailsViewUpdatedEventArgs.cs
- ContextMenu.cs
- Function.cs
- DispatcherEventArgs.cs
- ToolStripPanelSelectionBehavior.cs
- XPathNodeIterator.cs
- _Events.cs
- PointLight.cs
- WebPartCatalogAddVerb.cs
- FixedPageProcessor.cs
- HttpCookie.cs
- DragStartedEventArgs.cs
- Button.cs
- DesignerDataRelationship.cs
- XmlBinaryReader.cs
- XmlDeclaration.cs
- ParameterSubsegment.cs
- _NegotiateClient.cs
- _StreamFramer.cs
- XmlSchemaSimpleType.cs
- ChameleonKey.cs
- TextTreeObjectNode.cs
- UrlMappingsSection.cs
- Oci.cs
- CacheChildrenQuery.cs
- DummyDataSource.cs
- FlowLayoutPanelDesigner.cs
- ScriptManagerProxy.cs
- EpmContentSerializerBase.cs
- HttpContext.cs
- XmlSchemaSubstitutionGroup.cs
- TextEmbeddedObject.cs
- ToolStripRenderer.cs
- RecognizeCompletedEventArgs.cs
- EdmSchemaAttribute.cs
- PopupEventArgs.cs
- ServiceRouteHandler.cs
- CardSpaceSelector.cs
- uribuilder.cs
- RemotingConfiguration.cs
- SessionStateContainer.cs
- ThreadInterruptedException.cs
- UndoManager.cs
- IndentedWriter.cs
- TypeNameConverter.cs
- Trace.cs
- ColorKeyFrameCollection.cs
- WebPartZoneBase.cs
- ManagementOptions.cs
- Certificate.cs
- JoinCqlBlock.cs
- ConsoleKeyInfo.cs
- PromptBuilder.cs
- _ContextAwareResult.cs
- MetadataArtifactLoaderComposite.cs
- RegexCode.cs
- XPathChildIterator.cs
- DeviceSpecificChoice.cs
- ValidatedControlConverter.cs
- WebControlAdapter.cs
- CursorConverter.cs
- ProxyElement.cs
- LabelTarget.cs
- XmlObjectSerializerReadContext.cs
- ResetableIterator.cs
- ClickablePoint.cs
- CredentialCache.cs
- TextLineResult.cs
- DockPattern.cs
- AspNetSynchronizationContext.cs
- WebPart.cs
- SystemFonts.cs
- XPathBinder.cs
- Vector3DKeyFrameCollection.cs
- SemaphoreSlim.cs
- BadImageFormatException.cs
- IndicShape.cs
- ResourcePermissionBaseEntry.cs
- ExpressionEvaluator.cs
- SymbolMethod.cs
- FixedDocument.cs
- SmtpLoginAuthenticationModule.cs
- HtmlInputButton.cs
- Accessors.cs
- HashHelper.cs
- _Semaphore.cs
- TrackingMemoryStream.cs