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
- FullTextState.cs
- CultureTableRecord.cs
- OutputCacheSettingsSection.cs
- ResponseBodyWriter.cs
- NavigationPropertyEmitter.cs
- TriggerActionCollection.cs
- X509RecipientCertificateClientElement.cs
- ExchangeUtilities.cs
- RijndaelManaged.cs
- OnOperation.cs
- Blend.cs
- SqlUtils.cs
- AppDomainUnloadedException.cs
- XPathNodeIterator.cs
- WebPartDeleteVerb.cs
- JsonServiceDocumentSerializer.cs
- LinqDataSourceHelper.cs
- Visitor.cs
- Vector.cs
- PageCopyCount.cs
- PaperSource.cs
- CqlParser.cs
- HttpConfigurationContext.cs
- EntityKey.cs
- RegisteredScript.cs
- ToolStripMenuItem.cs
- XPathPatternParser.cs
- SimpleWorkerRequest.cs
- InkCollectionBehavior.cs
- XmlSchemas.cs
- ProxyGenerator.cs
- UserInitiatedNavigationPermission.cs
- Package.cs
- BitmapEffectDrawingContextWalker.cs
- TaskResultSetter.cs
- QueryOutputWriter.cs
- SplashScreenNativeMethods.cs
- SafeArrayRankMismatchException.cs
- StylusTip.cs
- TrustManagerMoreInformation.cs
- FontFaceLayoutInfo.cs
- Helper.cs
- ExpandedWrapper.cs
- WeakReadOnlyCollection.cs
- ControlParameter.cs
- BitmapPalettes.cs
- XamlClipboardData.cs
- Lock.cs
- TitleStyle.cs
- ConditionCollection.cs
- FillBehavior.cs
- NameTable.cs
- Util.cs
- MetadataArtifactLoaderComposite.cs
- ProcessThreadDesigner.cs
- StringAttributeCollection.cs
- BaseTemplateCodeDomTreeGenerator.cs
- FloatUtil.cs
- CatalogPart.cs
- HtmlInputControl.cs
- ObjectMemberMapping.cs
- ObjectStorage.cs
- TypedTableHandler.cs
- SqlParameterCollection.cs
- CodeSnippetExpression.cs
- AssociationType.cs
- DebugHandleTracker.cs
- X509ThumbprintKeyIdentifierClause.cs
- ParagraphResult.cs
- SerializerWriterEventHandlers.cs
- ErrorTableItemStyle.cs
- CodeVariableReferenceExpression.cs
- ZipIOBlockManager.cs
- TimeBoundedCache.cs
- TableLayout.cs
- TextEndOfParagraph.cs
- WorkflowServiceHost.cs
- SaveFileDialog.cs
- dsa.cs
- StateMachineWorkflowInstance.cs
- WindowsSysHeader.cs
- OdbcCommandBuilder.cs
- ApplicationFileParser.cs
- FileDialog.cs
- PixelShader.cs
- Errors.cs
- DataTableMappingCollection.cs
- SqlNode.cs
- WebSysDisplayNameAttribute.cs
- FileChangesMonitor.cs
- UnsafeNativeMethods.cs
- StackOverflowException.cs
- CodeMethodReturnStatement.cs
- ComPlusTypeLoader.cs
- WindowShowOrOpenTracker.cs
- SoapServerProtocol.cs
- BoundPropertyEntry.cs
- SoapServerMessage.cs
- FragmentQuery.cs
- X509Extension.cs