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
- DataObject.cs
- ControlAdapter.cs
- ColumnResizeAdorner.cs
- ThreadAttributes.cs
- ByteStack.cs
- FacetEnabledSchemaElement.cs
- CounterCreationDataCollection.cs
- UnhandledExceptionEventArgs.cs
- RoleManagerEventArgs.cs
- CodeBlockBuilder.cs
- StylusButtonCollection.cs
- FileDialog.cs
- ApplyHostConfigurationBehavior.cs
- LoginDesignerUtil.cs
- ConstraintStruct.cs
- EntityReference.cs
- AdCreatedEventArgs.cs
- CustomAttributeBuilder.cs
- BamlLocalizer.cs
- Propagator.cs
- LinqDataSourceHelper.cs
- XamlToRtfParser.cs
- RequestStatusBarUpdateEventArgs.cs
- GlobalizationAssembly.cs
- XmlQueryStaticData.cs
- DoubleLinkListEnumerator.cs
- CodeGotoStatement.cs
- ModuleConfigurationInfo.cs
- KeyInfo.cs
- TypographyProperties.cs
- TemplateControlCodeDomTreeGenerator.cs
- DecoratedNameAttribute.cs
- MethodToken.cs
- SqlDataReaderSmi.cs
- MenuItemStyleCollection.cs
- UnsafeNativeMethodsTablet.cs
- ISAPIWorkerRequest.cs
- TcpTransportBindingElement.cs
- DataGridViewImageColumn.cs
- HandlerElement.cs
- SemanticValue.cs
- Marshal.cs
- RangeValuePatternIdentifiers.cs
- MediaContextNotificationWindow.cs
- SqlDeflator.cs
- ExtentKey.cs
- InputLanguageProfileNotifySink.cs
- AccessDataSourceDesigner.cs
- DataRow.cs
- TextRangeEdit.cs
- ListenerHandler.cs
- ParameterBuilder.cs
- HttpListenerRequest.cs
- BitmapFrame.cs
- TypeDescriptionProvider.cs
- VariantWrapper.cs
- MemberDescriptor.cs
- SimpleWorkerRequest.cs
- Sql8ConformanceChecker.cs
- ColorAnimationUsingKeyFrames.cs
- FontConverter.cs
- DbReferenceCollection.cs
- SimpleTypeResolver.cs
- TemplatedControlDesigner.cs
- StringUtil.cs
- SelectionBorderGlyph.cs
- DragDeltaEventArgs.cs
- UrlAuthorizationModule.cs
- CodeDefaultValueExpression.cs
- GeometryDrawing.cs
- Constraint.cs
- BaseCodePageEncoding.cs
- EdmEntityTypeAttribute.cs
- XPathAxisIterator.cs
- WebPartUserCapability.cs
- DataControlLinkButton.cs
- __TransparentProxy.cs
- InputScope.cs
- FileChangesMonitor.cs
- SqlGatherProducedAliases.cs
- SafeNativeMethods.cs
- ResourceDescriptionAttribute.cs
- UserControlBuildProvider.cs
- WebPartMinimizeVerb.cs
- ReadOnlyObservableCollection.cs
- LabelEditEvent.cs
- CustomErrorsSectionWrapper.cs
- GenericXmlSecurityTokenAuthenticator.cs
- ReflectPropertyDescriptor.cs
- HttpHandlerAction.cs
- MenuCommand.cs
- TypeToTreeConverter.cs
- StringUtil.cs
- SafeCryptHandles.cs
- PeerNameRecordCollection.cs
- HWStack.cs
- WindowAutomationPeer.cs
- SqlUtil.cs
- Zone.cs
- QilXmlReader.cs