Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
compcode [2007/06/13 07:34] lavirotte |
compcode [2011/01/05 15:43] hourdin minor spelling fixes |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Sample of a Bean ====== | ||
+ | |||
+ | ===== Source Code ===== | ||
+ | |||
+ | Here is a sample code of a component in C# (save this to a file called Your_CSharpBean_Name.cs) : | ||
+ | |||
<code csharp> | <code csharp> | ||
- | using WComp.Beans; // It contains the definition of the attribute [Bean] | + | using WComp.Beans; // Contains the definition of the [Bean] attribute |
using System.Threading; // For the thread demo purposes | using System.Threading; // For the thread demo purposes | ||
Line 40: | Line 46: | ||
// This is the signature of the output method | // This is the signature of the output method | ||
public event Output_Sample_Signature Output_Sample; | public event Output_Sample_Signature Output_Sample; | ||
- | // The output port is the event (before) | + | // The output port is the event, named here Output_Sample |
// --- End: Output port sample --- | // --- End: Output port sample --- | ||
} | } | ||
} | } | ||
</code> | </code> | ||
+ | |||
+ | |||
+ | |||
+ | ===== Compilation ===== | ||
+ | |||
+ | Here is a sample of the command line compilation: | ||
+ | <code> | ||
+ | csc.exe /target:library /r:Beans.dll Sample_Component.cs | ||
+ | </code> | ||
+ | |||
+ | You will find Beans.dll in the SharpWComp distrib. |