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
- TextInfo.cs
- MultiPageTextView.cs
- TraceListeners.cs
- ManagementInstaller.cs
- OutputCacheSettings.cs
- HitTestWithGeometryDrawingContextWalker.cs
- ConnectionPoint.cs
- DbReferenceCollection.cs
- CssTextWriter.cs
- SqlBulkCopyColumnMappingCollection.cs
- NamespaceListProperty.cs
- ObjectConverter.cs
- NamespaceDecl.cs
- XmlSchemaObjectTable.cs
- CustomAttributeBuilder.cs
- GACIdentityPermission.cs
- HScrollBar.cs
- PairComparer.cs
- IEnumerable.cs
- SQLInt64Storage.cs
- ToolStripItemEventArgs.cs
- MediaTimeline.cs
- XPathQilFactory.cs
- Int32AnimationUsingKeyFrames.cs
- TreeViewItem.cs
- TemplatePropertyEntry.cs
- BrowserDefinition.cs
- CodeConstructor.cs
- FixedPageProcessor.cs
- CngProvider.cs
- LineServicesCallbacks.cs
- MessageEncoderFactory.cs
- PhysicalOps.cs
- smtpconnection.cs
- EndEvent.cs
- OutputCacheSettings.cs
- SoapObjectReader.cs
- cache.cs
- SmiMetaDataProperty.cs
- RegexRunnerFactory.cs
- ScriptHandlerFactory.cs
- IgnoreFlushAndCloseStream.cs
- BoolExpression.cs
- BaseValidator.cs
- HtmlControlPersistable.cs
- ResourcePool.cs
- CombinedHttpChannel.cs
- DefaultWorkflowTransactionService.cs
- SelectionProcessor.cs
- Size.cs
- VisualBrush.cs
- JoinCqlBlock.cs
- SQLStringStorage.cs
- StandardRuntimeEnumValidatorAttribute.cs
- ListViewSelectEventArgs.cs
- RelationshipSet.cs
- TypeResolver.cs
- FileEnumerator.cs
- BinaryObjectWriter.cs
- SafeIUnknown.cs
- ToolboxCategory.cs
- XPathSelfQuery.cs
- EditorPartDesigner.cs
- RowToFieldTransformer.cs
- ProfileInfo.cs
- EndpointAddressMessageFilter.cs
- objectresult_tresulttype.cs
- DataProtectionSecurityStateEncoder.cs
- InputBuffer.cs
- XmlSortKeyAccumulator.cs
- SubMenuStyleCollection.cs
- RawMouseInputReport.cs
- BulletChrome.cs
- MemberListBinding.cs
- Mutex.cs
- SubstitutionDesigner.cs
- LoginName.cs
- ContentElement.cs
- ScaleTransform3D.cs
- xdrvalidator.cs
- CodeCatchClause.cs
- TypeConverterBase.cs
- Atom10FormatterFactory.cs
- WpfGeneratedKnownProperties.cs
- HandleCollector.cs
- XmlDictionaryReaderQuotasElement.cs
- TextServicesLoader.cs
- ADConnectionHelper.cs
- Control.cs
- SqlNodeAnnotations.cs
- HttpCookieCollection.cs
- CodeGotoStatement.cs
- ExpressionLink.cs
- AdornerLayer.cs
- ListBindableAttribute.cs
- ReadWriteObjectLock.cs
- MediaTimeline.cs
- DefaultBinder.cs
- LeftCellWrapper.cs
- Console.cs