Code:
/ DotNET / DotNET / 8.0 / untmp / Orcas / RTM / ndp / fx / src / xsp / System / Web / Extensions / Script / Services / PageClientProxyGenerator.cs / 1 / PageClientProxyGenerator.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Script.Services { using System.Web; using System.Web.UI; internal class PageClientProxyGenerator : ClientProxyGenerator { private string _path; internal PageClientProxyGenerator(IPage page, bool debug) : this(page.Request.FilePath, debug) { } internal PageClientProxyGenerator(string path, bool debug) { _path = path; _debugMode = debug; } internal static string GetClientProxyScript(HttpContext context, IPage page, bool debug) { // Do nothing during unit tests which have no context or page if (context == null || page == null) return null; WebServiceData webServiceData = WebServiceData.GetWebServiceData(context, page.AppRelativeVirtualPath, false /*failIfNoData*/, true /*pageMethods */); if (webServiceData == null) return null; PageClientProxyGenerator proxyGenerator = new PageClientProxyGenerator(page, debug); return proxyGenerator.GetClientProxyScript(webServiceData); } protected override void GenerateTypeDeclaration(WebServiceData webServiceData, bool genClass) { if (genClass) { _builder.Append("PageMethods.prototype = "); } else { _builder.Append("var PageMethods = "); } } protected override string GetProxyTypeName(WebServiceData data) { return "PageMethods"; } protected override string GetProxyPath() { return _path; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InstanceKeyNotReadyException.cs
- WindowsRichEditRange.cs
- COAUTHINFO.cs
- UrlRoutingModule.cs
- TextBoxBaseDesigner.cs
- mediaeventshelper.cs
- MediaSystem.cs
- MultipartIdentifier.cs
- RegexCaptureCollection.cs
- PeerCollaboration.cs
- FormViewModeEventArgs.cs
- DataGridColumnCollection.cs
- DescendantBaseQuery.cs
- TranslateTransform.cs
- UIElement3D.cs
- XmlUTF8TextReader.cs
- DataServiceCollectionOfT.cs
- FormatterConverter.cs
- DataFormats.cs
- NativeWindow.cs
- CriticalHandle.cs
- NavigationCommands.cs
- DecoderBestFitFallback.cs
- HtmlValidatorAdapter.cs
- IdleTimeoutMonitor.cs
- PinnedBufferMemoryStream.cs
- TypeDescriptionProviderAttribute.cs
- _CommandStream.cs
- WindowsTooltip.cs
- EmptyStringExpandableObjectConverter.cs
- Cursors.cs
- VisualBasicSettingsHandler.cs
- ExpressionBuilderCollection.cs
- WebPartCloseVerb.cs
- SqlBulkCopy.cs
- Attributes.cs
- Matrix.cs
- DllNotFoundException.cs
- ToolboxBitmapAttribute.cs
- OperationAbortedException.cs
- RoleBoolean.cs
- RuntimeArgumentHandle.cs
- Choices.cs
- QueueException.cs
- DataGridItemCollection.cs
- CallbackException.cs
- OleStrCAMarshaler.cs
- OleDbReferenceCollection.cs
- Freezable.cs
- SaveFileDialog.cs
- ResourceReferenceExpressionConverter.cs
- StrongNameHelpers.cs
- FrameworkContentElement.cs
- _SSPISessionCache.cs
- WindowsPrincipal.cs
- CollectionMarkupSerializer.cs
- MediaCommands.cs
- DigestTraceRecordHelper.cs
- LicenseException.cs
- TextServicesDisplayAttribute.cs
- SqlCommandBuilder.cs
- SyndicationDeserializer.cs
- DataContractSerializerServiceBehavior.cs
- SQLInt64Storage.cs
- XmlSchemaElement.cs
- XmlSubtreeReader.cs
- Attributes.cs
- UIHelper.cs
- XamlTemplateSerializer.cs
- TemplateControlCodeDomTreeGenerator.cs
- GestureRecognitionResult.cs
- SQLChars.cs
- ScriptManagerProxy.cs
- IsolatedStorageException.cs
- AttributeParameterInfo.cs
- XpsFilter.cs
- CompositeCollectionView.cs
- ComponentEditorPage.cs
- Row.cs
- LiteralDesigner.cs
- SqlStream.cs
- SafeArrayTypeMismatchException.cs
- Overlapped.cs
- ComponentResourceManager.cs
- ListSortDescriptionCollection.cs
- ResourceProviderFactory.cs
- QueryNode.cs
- UIElement.cs
- Pkcs7Recipient.cs
- PointCollection.cs
- ValueTypeFixupInfo.cs
- StylusPointProperties.cs
- UnsafeNativeMethods.cs
- CodeCommentStatement.cs
- WebResourceAttribute.cs
- DetailsViewDeleteEventArgs.cs
- BufferAllocator.cs
- QuaternionRotation3D.cs
- ItemsControl.cs
- SqlWorkflowPersistenceService.cs