次の方法で共有


ContractReference.DefaultFilename プロパティ

参照先のサービスの説明を保存するときに使用する既定のファイル名を取得します。

Overrides Public ReadOnly Property DefaultFilename As String
[C#]
public override string DefaultFilename {get;}
[C++]
public: __property String* get_DefaultFilename();
[JScript]
public override function get DefaultFilename() : String;

プロパティ値

参照先のサービスの説明をファイルに保存するときに使用する既定のファイル名。

使用例

 
Dim myProtocol As New DiscoveryClientProtocol()

' Get the DiscoveryDocument.
Dim myDiscoveryDocument As DiscoveryDocument = _
    myProtocol.Discover("https://localhost/ContractReference/Test_vb.disco")
Dim myArrayList As ArrayList = _
    CType(myDiscoveryDocument.References, ArrayList)

' Get the ContractReference.
Dim myContractRefrence As ContractReference = _
    CType(myArrayList(0), ContractReference)

' Get the DefaultFileName associated with the .disco file.
Dim myFileName As String  = myContractRefrence.DefaultFilename

' Get the URL associated with the .disco file.
Dim myUrl As String  = myContractRefrence.Url
Console.WriteLine("The DefaulFilename is: " + myUrl)
Console.WriteLine("The URL is: " + myUrl)

[C#] 
DiscoveryClientProtocol myProtocol = new DiscoveryClientProtocol();

// Get the DiscoveryDocument.
DiscoveryDocument myDiscoveryDocument =
    myProtocol.Discover("https://localhost/ContractReference/test_cs.disco");
ArrayList myArrayList = (ArrayList)myDiscoveryDocument.References;

 // Get the ContractReference.
ContractReference myContractRefrence = (ContractReference)myArrayList[0];

// Get the DefaultFileName associated with the .disco file.
String myFileName = myContractRefrence.DefaultFilename;

// Get the URL associated with the .disco file.
String myUrl = myContractRefrence.Url;
Console.WriteLine("The DefaulFilename is: " + myUrl);
Console.WriteLine("The URL is: " + myUrl);

[C++] 
DiscoveryClientProtocol* myProtocol = new DiscoveryClientProtocol();

// Get the DiscoveryDocument.
DiscoveryDocument* myDiscoveryDocument =
    myProtocol->Discover(S"https://localhost/ContractReference/test_cs.disco");
ArrayList* myArrayList = dynamic_cast<ArrayList*>(myDiscoveryDocument->References);

// Get the ContractReference.
ContractReference* myContractRefrence = dynamic_cast<ContractReference*>(myArrayList->Item[0]);

// Get the DefaultFileName associated with the .disco file.
String* myFileName = myContractRefrence->DefaultFilename;

// Get the URL associated with the .disco file.
String* myUrl = myContractRefrence->Url;
Console::WriteLine(S"The DefaulFilename is: {0}", myUrl);
Console::WriteLine(S"The URL is: {0}", myUrl);

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

ContractReference クラス | ContractReference メンバ | System.Web.Services.Discovery 名前空間