Aracılığıyla paylaş


ComContractElement.ExposedMethods Özellik

Tanım

BIR COM+ bileşenindeki arabirim bir Web hizmeti olarak kullanıma sunulduğunda kullanıma sunulan COM+ yöntemlerinin bir koleksiyonunu alır.

public:
 property System::ServiceModel::Configuration::ComMethodElementCollection ^ ExposedMethods { System::ServiceModel::Configuration::ComMethodElementCollection ^ get(); };
[System.Configuration.ConfigurationProperty("exposedMethods", Options=System.Configuration.ConfigurationPropertyOptions.None)]
public System.ServiceModel.Configuration.ComMethodElementCollection ExposedMethods { get; }
[<System.Configuration.ConfigurationProperty("exposedMethods", Options=System.Configuration.ConfigurationPropertyOptions.None)>]
member this.ExposedMethods : System.ServiceModel.Configuration.ComMethodElementCollection
Public ReadOnly Property ExposedMethods As ComMethodElementCollection

Özellik Değeri

ComMethodElementCollection

BIR COM+ bileşenindeki arabirim bir Web hizmeti olarak kullanıma sunulduğunda kullanıma sunulan COM+ yöntemlerinin koleksiyonu.

Öznitelikler

Açıklamalar

COM+ tümleştirme yapılandırma aracı (ComSvcConfig.exe), oluşturulan hizmet sözleşmesinde görünecek bir COM arabiriminden belirli yöntemler eklemek için kullanılabilir.

Örneğin, bileşendeki COM arabiriminden IFinances ItemOrders.Financial oluşturulan hizmet sözleşmesine üç adlandırılmış yöntemi eklemek için aşağıdaki komutu kullanabilirsiniz.

ComSvcConfig.exe /i /application:OnlineStore /contract:ItemOrders.Financial,IFinances.{TransferFunds,AddFunds,RemoveFunds} /hosting:complus  

ComSvcConfig.exe aracını çalıştırdığınızda, daha önce bahsedilen yöntemleri öğe olarak exposedMethod listeleyen aşağıdaki hizmet sözleşmesini oluşturur.

<comContracts>
  <comContract contract="{5163B1E7-F0CF-4B6A-9A02-4AB654F34284}"                     												   																						   
  namespace="http://tempuri.org/5163B1E7-F0CF-4B6A-9A02-4AB654F34284"													   																						   
  name="_Broker" requiresSession="true">
    <userDefinedTypes>
      <userDefinedType name="CustomerType"																	   																						   
         typeLibID="{91DC728C-4F1A-45de-A9B6-B538E209CEA6}"															   																						   
         typeLibVersion="1.0"																		   																						   
         typeDefID="{D129765C-F211-434e-825A-9A63198C41F2}" />          
      <userDefinedType name="AddressType"																	   																						   
         typeLibID="{91DC728C-4F1A-45de-A9B6-B538E209CEA6}"															   																						   
         typeLibVersion="1.0"																		   																						   
         typeDefID="{4616AE0D-687A-43B7-BC63-141AE3DFD099}" />          
    </userDefinedTypes>
    <exposedMethods>
      <add exposedMethod ="BuyStock" />
      <add exposedMethod ="SellStock" />
      <add exposedMethod ="ExecuteTransaction" />
    </exposedMethods>
  </comContract>
</comContracts>

Hizmet başlatma zamanında, çalışma zamanı üzerine yansıtarak ve yalnızca öğe listesine exposedMethod dahil edilen yöntemleri ekleyerek bir hizmet sözleşmesi oluşturmaya çalışır. Hizmet sözleşmesine dahil olmayan her arabirim yöntemi için bir izleme oluşturulur.

Şunlara uygulanır