WebReference.ProxyCode プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > WebReference.ProxyCode プロパティの意味・解説 

WebReference.ProxyCode プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

Web 参照関連付けられているコード名前空間を取得します

名前空間: System.Web.Services.Description
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Public ReadOnly Property
 ProxyCode As CodeNamespace
Dim instance As WebReference
Dim value As CodeNamespace

value = instance.ProxyCode
public CodeNamespace ProxyCode { get; }
public:
property CodeNamespace^ ProxyCode {
    CodeNamespace^ get ();
}
/** @property */
public CodeNamespace get_ProxyCode ()
public function get ProxyCode
 () : CodeNamespace

プロパティ
GenerateWebReferences メソッド呼び出されたときにプロキシ コード生成される CodeNamespace。

使用例使用例

ProxyCode プロパティ使用方法コード例次に示します

// Read in a WSDL service description.
string url = "http://www.contoso.com/Example/WebService.asmx?WSDL";
XmlTextReader reader = new XmlTextReader(url);
ServiceDescription wsdl = ServiceDescription.Read(reader);

// Create a WSDL collection.
DiscoveryClientDocumentCollection wsdlCollection = 
    new DiscoveryClientDocumentCollection();
wsdlCollection.Add(url, wsdl);

// Create a namespace.
CodeNamespace proxyNamespace = new CodeNamespace("ExampleNamespace");

// Create a web reference using the WSDL collection.
string baseUrl = "http://www.contoso.com";
string urlKey = "ExampleUrlKey";
string protocolName = "Soap12";
WebReference reference = new WebReference(
    wsdlCollection, proxyNamespace, protocolName, urlKey, baseUrl);

// Print some information about the web reference.
Console.WriteLine("The WebReference object contains {0} document(s).",
 
    reference.Documents.Count);
Console.WriteLine("The protocol name is {0}.", reference.ProtocolName);
Console.WriteLine("The base URL is {0}.", reference.AppSettingBaseUrl);
Console.WriteLine("The URL key is {0}.", reference.AppSettingUrlKey);

// Print some information about the proxy code namespace.
Console.WriteLine("The proxy code namespace is {0}.",
 
    reference.ProxyCode.Name);

// Print some information about the validation warnings.
Console.WriteLine("There are {0} validation warnings.",
    reference.ValidationWarnings.Count);

// Print some information about the warnings.
if (reference.Warnings == 0)
{
    Console.WriteLine("There are no warnings.");
}
else
{
    Console.WriteLine("Warnings: " + reference.Warnings);
}
// Read in a WSDL service description.
String url = "http://www.contoso.com/Example/WebService.asmx?WSDL";
XmlTextReader reader = new XmlTextReader(url);
ServiceDescription wsdl = ServiceDescription.Read(reader);

// Create a WSDL collection.
DiscoveryClientDocumentCollection wsdlCollection = 
    new DiscoveryClientDocumentCollection();
wsdlCollection.Add(url, wsdl);

// Create a namespace.
CodeNamespace proxyNamespace = new CodeNamespace("ExampleNamespace");

// Create a web reference using the WSDL collection.
String baseUrl = "http://www.contoso.com";
String urlKey = "ExampleUrlKey";
String protocolName = "Soap12";
WebReference reference = new WebReference(wsdlCollection, 
    proxyNamespace, protocolName, urlKey, baseUrl);

// Print some information about the web reference.
Console.WriteLine("The WebReference object contains {0} document(s).",
 
    System.Convert.ToString(reference.get_Documents().get_Count()));
Console.WriteLine("The protocol name is {0}.", 
    reference.get_ProtocolName());
Console.WriteLine("The base URL is {0}.", 
    reference.get_AppSettingBaseUrl());
Console.WriteLine("The URL key is {0}.", 
    reference.get_AppSettingUrlKey());

// Print some information about the proxy code namespace.
Console.WriteLine("The proxy code namespace is {0}.",
 
    reference.get_ProxyCode().get_Name());

// Print some information about the validation warnings.
Console.WriteLine("There are {0} validation warnings.", 
    System.Convert.ToString(reference.get_ValidationWarnings().
    get_Count()));

// Print some information about the warnings.
if (reference.get_Warnings().
    Equals((System.Web.Services.Description.
    ServiceDescriptionImportWarnings)0)) {
    Console.WriteLine("There are no warnings.");
}
else {
    Console.WriteLine("Warnings: " + reference.get_Warnings());
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WebReference クラス
WebReference メンバ
System.Web.Services.Description 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

WebReference.ProxyCode プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



WebReference.ProxyCode プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS