NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ComEmulateAttribute Class

Use this attribute on a class to indicate that the class is an emulator class for another NGWS class. The emulator class acts as a proxy for managed types that supportnstances of the emulator class are activated via COM's CoCreateInstance API. This include instances created from managed clients which always interact with the emulator class through COM Interop.

Refer to

Object
   Attribute
      ComEmulateAttribute

[Visual Basic]
Public Class ComEmulateAttribute
   Inherits Attribute
[C#]
public class ComEmulateAttribute : Attribute
[C++]
public __gc class ComEmulateAttribute : public Attribute
[JScript]
public class ComEmulateAttribute extends Attribute

Remarks

[To be supplied.]

Requirements

Namespace: System.Runtime.InteropServices

Assembly: mscorlib.dll

Example [C#]

[C#]

[guid("557B96C4-F7E6-4d48-BBC3-10981E0CA664")] 
[ComEmulate("Component.Account")] 
[Transaction(Required)] 
public class EmulAccount { } 

[guid("871D8D5C-ECC6-40a5-BD82-D5E3B1740095")] 
internal class Account : IAccount 
{ 
    public void Debit(int amount) 
    {
      //... do some Db work 
      if (ok)
          ContextUtil.SetComplete();
      else 
          ContextUtil.SetAbort();
     }
}

See Also

ComEmulateAttribute Members | System.Runtime.InteropServices Namespace