DiscoveryClientProtocol.AdditionalInformation プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
探索ドキュメントで発見された参照に加えて、情報を取得します。
public:
property System::Collections::IList ^ AdditionalInformation { System::Collections::IList ^ get(); };
public System.Collections.IList AdditionalInformation { get; }
member this.AdditionalInformation : System.Collections.IList
Public ReadOnly Property AdditionalInformation As IList
プロパティ値
探索ドキュメント内にある追加情報を格納している IList。
例
#using <System.dll>
#using <System.Xml.dll>
#using <System.Web.Services.dll>
using namespace System;
using namespace System::Net;
using namespace System::Xml;
using namespace System::Web::Services::Discovery;
int main()
{
try
{
// dataservice.disco is a sample discovery document.
String^ myStringUrl = "http://localhost/dataservice.disco";
// Call the Discover method to populate the Documents property.
DiscoveryClientProtocol^ myDiscoveryClientProtocol = gcnew DiscoveryClientProtocol;
myDiscoveryClientProtocol->Credentials = CredentialCache::DefaultCredentials;
myDiscoveryClientProtocol->Discover( myStringUrl );
SoapBinding^ mySoapBinding = gcnew SoapBinding;
mySoapBinding->Address = "http://schemas.xmlsoap.org/disco/scl/";
mySoapBinding->Binding = gcnew XmlQualifiedName( "String*","http://www.w3.org/2001/XMLSchema" );
myDiscoveryClientProtocol->AdditionalInformation->Add( mySoapBinding );
// Write the information back.
myDiscoveryClientProtocol->WriteAll( "MyDirectory", "results.discomap" );
System::Collections::IList^ myIList = myDiscoveryClientProtocol->AdditionalInformation;
mySoapBinding = nullptr;
mySoapBinding = dynamic_cast<SoapBinding^>(myIList[ 0 ]);
Console::WriteLine( "The address of the SoapBinding associated with "
"AdditionalInformation is: {0}", mySoapBinding->Address );
}
catch ( Exception^ e )
{
Console::WriteLine( e );
}
}
using System;
using System.Net;
using System.Security.Permissions;
using System.Xml;
using System.Web.Services.Discovery;
class DiscoverySoapBindingClass
{
static void Main()
{
Run();
}
[PermissionSetAttribute(SecurityAction.Demand, Name="FullTrust")]
static void Run()
{
try
{
// dataservice.disco is a sample discovery document.
string myStringUrl = "http://localhost/dataservice.disco";
// Call the Discover method to populate the Documents property.
DiscoveryClientProtocol myDiscoveryClientProtocol =
new DiscoveryClientProtocol();
myDiscoveryClientProtocol.Credentials =
CredentialCache.DefaultCredentials;
DiscoveryDocument myDiscoveryDocument =
myDiscoveryClientProtocol.Discover(myStringUrl);
SoapBinding mySoapBinding = new SoapBinding();
mySoapBinding.Address = "http://schemas.xmlsoap.org/disco/scl/";
mySoapBinding.Binding = new XmlQualifiedName("string",
"http://www.w3.org/2001/XMLSchema");
myDiscoveryClientProtocol.AdditionalInformation.Add(mySoapBinding);
// Write the information back.
myDiscoveryClientProtocol.WriteAll("MyDirectory",
"results.discomap");
System.Collections.IList myIList =
myDiscoveryClientProtocol.AdditionalInformation;
mySoapBinding = null;
mySoapBinding = (SoapBinding)myIList[0];
Console.WriteLine("The address of the SoapBinding associated "
+ "with AdditionalInformation is: "
+ mySoapBinding.Address);
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
}
}
Imports System.Net
Imports System.Security.Permissions
Imports System.Xml
Imports System.Web.Services.Discovery
Class DiscoverySoapBindingMod
Shared Sub Main()
Run()
End Sub
<PermissionSetAttribute(SecurityAction.Demand, Name := "FullTrust")> _
Shared Sub Run()
Try
' dataservice.disco is a sample discovery document.
Dim myStringUrl As String = "http://localhost/dataservice.disco"
' Call the Discover method to populate the Documents property.
Dim myDiscoveryClientProtocol As DiscoveryClientProtocol = _
New DiscoveryClientProtocol()
myDiscoveryClientProtocol.Credentials = _
CredentialCache.DefaultCredentials
Dim myDiscoveryDocument As DiscoveryDocument = _
myDiscoveryClientProtocol.Discover(myStringUrl)
Dim mySoapBinding As SoapBinding = New SoapBinding()
mySoapBinding.Address = "http://schemas.xmlsoap.org/disco/scl/"
mySoapBinding.Binding = New XmlQualifiedName("string", _
"http://www.w3.org/2001/XMLSchema")
myDiscoveryClientProtocol.AdditionalInformation.Add(mySoapBinding)
' Write the information back.
myDiscoveryClientProtocol.WriteAll("MyDirectory", _
"results.discomap")
Dim myIList As System.Collections.IList = _
myDiscoveryClientProtocol.AdditionalInformation
mySoapBinding = Nothing
mySoapBinding = CType(myIList(0),SoapBinding)
Console.WriteLine("The address of the SoapBinding associated " _
& "with AdditionalInformation is: " & mySoapBinding.Address)
Catch e As Exception
Console.WriteLine(e.ToString())
End Try
End Sub
End Class
注釈
プロパティには AdditionalInformation 主に、探索ドキュメントで定義されている クラスによって SoapBinding 表される SOAP バインドが含まれます。
適用対象
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET