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
- LocatorManager.cs
- InstanceDataCollectionCollection.cs
- DllNotFoundException.cs
- BamlLocalizer.cs
- SystemNetworkInterface.cs
- DataBinding.cs
- CircleHotSpot.cs
- SerializationStore.cs
- BooleanExpr.cs
- UInt32.cs
- _CookieModule.cs
- Rule.cs
- TimeSpan.cs
- WebPartDisplayMode.cs
- InstancePersistenceContext.cs
- XamlBrushSerializer.cs
- BevelBitmapEffect.cs
- TypeDescriptorContext.cs
- WindowVisualStateTracker.cs
- IDReferencePropertyAttribute.cs
- CatalogZoneAutoFormat.cs
- HijriCalendar.cs
- ScriptManager.cs
- RepeaterDataBoundAdapter.cs
- Buffer.cs
- CodeTypeOfExpression.cs
- ProfilePropertySettings.cs
- SiteMapNodeCollection.cs
- NonPrimarySelectionGlyph.cs
- TableAutomationPeer.cs
- Model3DGroup.cs
- SchemaInfo.cs
- XPathSelectionIterator.cs
- ViewGenResults.cs
- UnionExpr.cs
- XmlArrayItemAttribute.cs
- FormsAuthenticationUserCollection.cs
- SplashScreen.cs
- PrimitiveCodeDomSerializer.cs
- SingleAnimation.cs
- ProgressChangedEventArgs.cs
- TdsParserSafeHandles.cs
- String.cs
- PropertyEmitter.cs
- EmptyEnumerator.cs
- RuntimeConfigLKG.cs
- AspNetSynchronizationContext.cs
- ListControl.cs
- DictionaryContent.cs
- ByteStream.cs
- DeflateEmulationStream.cs
- Evaluator.cs
- WSFederationHttpBinding.cs
- FrameworkReadOnlyPropertyMetadata.cs
- XmlSchemaObjectCollection.cs
- Compiler.cs
- FileRecordSequenceCompletedAsyncResult.cs
- DbgUtil.cs
- PanelStyle.cs
- SoapSchemaImporter.cs
- Debugger.cs
- TrackingMemoryStreamFactory.cs
- X509ChainPolicy.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- SafeNativeMethods.cs
- PageParser.cs
- TextEditorContextMenu.cs
- glyphs.cs
- LinkClickEvent.cs
- SlipBehavior.cs
- ApplicationServiceHelper.cs
- XsdDataContractExporter.cs
- GetTokenRequest.cs
- FaultPropagationQuery.cs
- TraceSwitch.cs
- ContextBase.cs
- RoleGroupCollection.cs
- SqlRetyper.cs
- PointAnimationUsingPath.cs
- PriorityQueue.cs
- LocalizableResourceBuilder.cs
- JulianCalendar.cs
- PrintingPermission.cs
- DirectoryGroupQuery.cs
- VersionValidator.cs
- NegotiationTokenAuthenticatorStateCache.cs
- oledbmetadatacollectionnames.cs
- X509Certificate.cs
- LineMetrics.cs
- GridEntry.cs
- CompositeKey.cs
- XmlSchemaInfo.cs
- SecurityContextTokenCache.cs
- EntityProxyTypeInfo.cs
- LiteralDesigner.cs
- HiddenFieldDesigner.cs
- TextEditorSpelling.cs
- CqlBlock.cs
- GraphicsContext.cs
- UpdateTracker.cs