Microsoft Identity Integration Server 2003 Developer Reference |
You can use C# to create a management agent rules extension. There are two ways to create the project files for rules extensions:
If you want to create your rules extension on a different system, you can use Visual Studio .NET to create the project files. You will need to copy the Microsoft.MetadirectoryServices assembly to your development system and manually create a reference to the assembly. You can find the assembly in the bin\assemblies folder of the Microsoft Identity Integration Server program folder. The default folder for Microsoft Identity Integration Server is C:\Program Files\Microsoft Identity Integration Server\bin\assemblies\.
To create a rules extension using Visual Studio .NET, you must complete the following steps in the order in which they appear:
To create a new C# class library project
The Microsoft Visual Studio .NET 2003 development environment appears.
Your project name now appears in Solution Explorer.
Note We recommend that you store the project on your local computer rather than on a network location.
To add a reference to the Microsoft.MetadirectoryServices assembly
In Solution Explorer, Microsoft.MetadirectoryServices now appears as one of the references.
To copy the code to the code pane and make changes to the code
using System; using Microsoft.MetadirectoryServices; // Replace <sample namespace name> with the name of your rules extension. // If you do not replace <sample namespace name> with the name of your // rules extension, you will not be able to compile this file. namespace <sample namespace name> { // Replace <extension object name> with the name of your rules // extension class. If you do not replace <extension object name> // with the name of your rules extension class, you will not be // able to compile this file. /// <summary> /// Summary description for <extension object name>. /// </summary> public class <extension object name> : IMASynchronization { public <extension object name>() { // // TODO: Add constructor logic here // } void IMASynchronization.Initialize () { // // TODO: write initialization code // } void IMASynchronization.Terminate () { // // TODO: write termination code // } bool IMASynchronization.ShouldProjectToMV (CSEntry csentry, out string MVObjectType) { // // TODO: Remove this throw statement if you implement this method // throw new EntryPointNotImplementedException(); } DeprovisionAction IMASynchronization.Deprovision (CSEntry csentry) { // // TODO: Remove this throw statement if you implement this method // throw new EntryPointNotImplementedException(); } bool IMASynchronization.FilterForDisconnection (CSEntry csentry) { // // TODO: write disconnection filter code // throw new EntryPointNotImplementedException(); } void IMASynchronization.MapAttributesForJoin (string FlowRuleName, CSEntry csentry, ref ValueCollection values) { // // TODO: write join mapping code // throw new EntryPointNotImplementedException(); } bool IMASynchronization.ResolveJoinSearch (string joinCriteriaName, CSEntry csentry, MVEntry[] rgmventry, out int imventry, ref string MVObjectType) { // // TODO: write join resolution code // throw new EntryPointNotImplementedException(); } void IMASynchronization.MapAttributesForImport( string FlowRuleName, CSEntry csentry, MVEntry mventry) { // // TODO: write your import attribute flow code // throw new EntryPointNotImplementedException(); } void IMASynchronization.MapAttributesForExport (string FlowRuleName, MVEntry mventry, CSEntry csentry) { // // TODO: write your export attribute flow code // throw new EntryPointNotImplementedException(); } } }
To build the class library
If you see the following message, the rules extension was successfully built:
------ Build started: Project: Management Agent Rules Extension, Configuration: Debug .NET ------ Preparing resources... Updating references... Performing main compilation... Building satellite assemblies... ---------------------- Done ---------------------- Build: 1 succeeded, 0 failed, 0 skipped
The rules extension file, which has a .dll extension, is in the bin\Debug folder of your project folder.
Before using the rules extension, install it in the Microsoft Identity Integration Server rules extensions folder. The default folder for rules extensions is C:\Program Files\Microsoft Identity Integration Server\Extensions.
This procedure is optional. You can set Visual Studio .NET 2003 to automatically install the rules extension in the rules extensions folder as part of the build process.
To install the rules extension in the rules extensions folder
There are two folders in the Property Pages dialog box: Common Properties and Configuration Properties.
The default folder for rules extensions is C:\Program Files\Microsoft Identity Integration Server\Extensions.