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
- FtpWebResponse.cs
- EntityReference.cs
- LiteralTextParser.cs
- ResourceReader.cs
- MetabaseSettings.cs
- HttpCookieCollection.cs
- LowerCaseStringConverter.cs
- SpecialNameAttribute.cs
- Schema.cs
- DefaultValueAttribute.cs
- InstanceLockLostException.cs
- DelegatingStream.cs
- TraceContextEventArgs.cs
- FilterException.cs
- MD5CryptoServiceProvider.cs
- MouseDevice.cs
- RepeatButtonAutomationPeer.cs
- UnsafeNativeMethods.cs
- TextParagraphView.cs
- SkinBuilder.cs
- RegexCompiler.cs
- Label.cs
- Keywords.cs
- DefaultMemberAttribute.cs
- KeyedHashAlgorithm.cs
- CanExecuteRoutedEventArgs.cs
- HttpPostProtocolReflector.cs
- RectangleConverter.cs
- TypeSystem.cs
- DragCompletedEventArgs.cs
- BroadcastEventHelper.cs
- EncryptedPackage.cs
- AdjustableArrowCap.cs
- RootAction.cs
- BrowserDefinition.cs
- TypeConverters.cs
- KeyValueInternalCollection.cs
- TreeNodeMouseHoverEvent.cs
- FrameworkTextComposition.cs
- HierarchicalDataSourceControl.cs
- SelectionItemPattern.cs
- SamlSerializer.cs
- LocatorGroup.cs
- FormatException.cs
- HtmlGenericControl.cs
- SecurityDocument.cs
- WasAdminWrapper.cs
- EraserBehavior.cs
- TypeUsage.cs
- ByteAnimationBase.cs
- SqlIdentifier.cs
- ToolStripButton.cs
- DesignerTransaction.cs
- ValidationErrorEventArgs.cs
- EncodedStreamFactory.cs
- MsmqIntegrationMessageProperty.cs
- webclient.cs
- ToolStripDropDownClosedEventArgs.cs
- PanelContainerDesigner.cs
- SizeFConverter.cs
- DispatchWrapper.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- ByteKeyFrameCollection.cs
- XmlBinaryWriter.cs
- ImmutableObjectAttribute.cs
- PeerNearMe.cs
- SoapFormatter.cs
- BackgroundFormatInfo.cs
- InternalConfigSettingsFactory.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- ProfileService.cs
- MethodRental.cs
- ComplexTypeEmitter.cs
- Line.cs
- TableLayoutStyleCollection.cs
- UITypeEditor.cs
- ZipIOExtraField.cs
- WorkflowTransactionOptions.cs
- Calendar.cs
- EventTrigger.cs
- CollaborationHelperFunctions.cs
- HttpClientCertificate.cs
- DataPagerFieldCommandEventArgs.cs
- AuthenticatedStream.cs
- ObjectViewFactory.cs
- CatalogZoneAutoFormat.cs
- Graphics.cs
- DependencyObjectProvider.cs
- XmlIlTypeHelper.cs
- CategoryGridEntry.cs
- __Filters.cs
- HostedAspNetEnvironment.cs
- UseLicense.cs
- ConstraintStruct.cs
- CodeTypeDelegate.cs
- AssemblyBuilder.cs
- ActivityExecutionFilter.cs
- SkewTransform.cs
- LinearKeyFrames.cs
- CompModHelpers.cs