MetaData.ConvertTypesToSchemaToFile Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Belirtilen türleri XML şemasına dönüştürür ve bir dosyaya yazar.
Aşırı Yüklemeler
ConvertTypesToSchemaToFile(ServiceType[], SdlType, String) |
Belirtilen hizmet türlerini XML şemasına dönüştürür ve adla belirtilen bir dosyaya yazar. |
ConvertTypesToSchemaToFile(Type[], SdlType, String) |
Belirtilen nesne türlerini XML şemasına dönüştürür ve adla belirtilen bir dosyaya yazar. |
ConvertTypesToSchemaToFile(ServiceType[], SdlType, String)
Belirtilen hizmet türlerini XML şemasına dönüştürür ve adla belirtilen bir dosyaya yazar.
public:
static void ConvertTypesToSchemaToFile(cli::array <System::Runtime::Remoting::MetadataServices::ServiceType ^> ^ types, System::Runtime::Remoting::MetadataServices::SdlType sdlType, System::String ^ path);
public static void ConvertTypesToSchemaToFile (System.Runtime.Remoting.MetadataServices.ServiceType[] types, System.Runtime.Remoting.MetadataServices.SdlType sdlType, string path);
static member ConvertTypesToSchemaToFile : System.Runtime.Remoting.MetadataServices.ServiceType[] * System.Runtime.Remoting.MetadataServices.SdlType * string -> unit
Public Shared Sub ConvertTypesToSchemaToFile (types As ServiceType(), sdlType As SdlType, path As String)
Parametreler
- types
- ServiceType[]
ServiceType XML şemasına dönüştürülecek örnekler.
- sdlType
- SdlType
XML şeması için kullanılacak hizmet açıklaması dili türü.
- path
- String
XML dosyasının yolu.
Açıklamalar
Örnek ServiceType , url'yi nesnesiyle Typeilişkilendirmenizi sağlar.
Not
Belirtilen ada sahip bir dosya zaten varsa, üzerine yazılır.
Şunlara uygulanır
ConvertTypesToSchemaToFile(Type[], SdlType, String)
Belirtilen nesne türlerini XML şemasına dönüştürür ve adla belirtilen bir dosyaya yazar.
public:
static void ConvertTypesToSchemaToFile(cli::array <Type ^> ^ types, System::Runtime::Remoting::MetadataServices::SdlType sdlType, System::String ^ path);
public static void ConvertTypesToSchemaToFile (Type[] types, System.Runtime.Remoting.MetadataServices.SdlType sdlType, string path);
static member ConvertTypesToSchemaToFile : Type[] * System.Runtime.Remoting.MetadataServices.SdlType * string -> unit
Public Shared Sub ConvertTypesToSchemaToFile (types As Type(), sdlType As SdlType, path As String)
Parametreler
- types
- Type[]
XML şemasına dönüştürülecek nesne türleri.
- sdlType
- SdlType
XML şeması için kullanılacak hizmet açıklaması dili türü.
- path
- String
XML dosyasının yolu.
Örnekler
Aşağıdaki kod örneği, belirtilen türlerin ConvertTypesToSchemaToFile şema tanımını bir dosyaya yazmak için yönteminin kullanımını gösterir.
#using <system.dll>
#using <system.runtime.remoting.dll>
using namespace System;
using namespace System::Runtime::Remoting::Metadata;
using namespace System::Runtime::Remoting::MetadataServices;
ref class TestClass
{
private:
int integer;
public:
static const double dFloatingPoint = 5.1999;
property int Int
{
int get()
{
return integer;
}
void set( int value )
{
integer = value;
}
}
void Print()
{
Console::WriteLine( "The double is equal to {0}.", dFloatingPoint );
}
};
int main()
{
array<Type^>^types = gcnew array<Type^>(4);
String^ s = "a";
int i = -5;
double d = 3.1415;
TestClass^ tc = gcnew TestClass;
types[ 0 ] = s->GetType();
types[ 1 ] = i.GetType();
types[ 2 ] = d.GetType();
types[ 3 ] = tc->GetType();
MetaData::ConvertTypesToSchemaToFile( types, SdlType::Wsdl, "test.xml" );
return 0;
}
using System;
using System.Runtime.Remoting.Metadata;
using System.Runtime.Remoting.MetadataServices;
public class Test {
class TestClass {
int integer;
public double dFloatingPoint = 5.1999;
public int Int {
get { return integer; }
set { integer = value; }
}
public void Print () {
Console.WriteLine("The double is equal to {0}.", dFloatingPoint);
}
}
public static void Main() {
Type[] types = new Type[4];
String s = "a";
int i = -5;
double d = 3.1415;
TestClass tc = new TestClass();
types[0] = s.GetType();
types[1] = i.GetType();
types[2] = d.GetType();
types[3] = tc.GetType();
MetaData.ConvertTypesToSchemaToFile(types, SdlType.Wsdl, "test.xml");
}
}
Imports System.Runtime.Remoting.Metadata
Imports System.Runtime.Remoting.MetadataServices
Public Class Test
Class TestClass
Private [integer] As Integer
Public dFloatingPoint As Double = 3.1999
Public Property Int() As Integer
Get
Return [integer]
End Get
Set
[integer] = value
End Set
End Property
Public Sub Print()
Console.WriteLine("The double is equal to {0}.", dFloatingPoint)
End Sub
End Class
Public Shared Sub Main()
Dim types(4) As Type
Dim s As [String] = "a"
Dim i As Integer = - 5
Dim d As Double = 3.1415
Dim tc As New TestClass()
types(0) = s.GetType()
types(1) = i.GetType()
types(2) = d.GetType()
types(3) = tc.GetType()
MetaData.ConvertTypesToSchemaToFile(types, SdlType.Wsdl, "test.xml")
End Sub
End Class
Açıklamalar
Not
Belirtilen ada sahip bir dosya zaten varsa, üzerine yazılır.
Şunlara uygulanır
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin