How to: Create Metaverse Rules Extensions

A Forefront Identity Manager Synchronization Service (FIM Synchronization Service) database (metaverse) rules extension must implement the IMVSynchronization interface. The contents of IMVSynchronization are specified in the Microsoft.MetadirectoryServices namespace and include the following methods:

The following examples show a class declaration for a metaverse rules extension:

Public Class MyMVExtensionClass
    Implements IMVSynchronization
namespace Sample_CSharp_MV_Extension
{
    public class MyMVExtensionClass : IMVSynchronization
    {
    }
}

When you implement an interface, you must implement all the methods defined by that interface. This means that when you create a management agent rules extension, you must also implement, at a minimum, all the methods listed earlier in this topic.

The following examples show an entire class declaration for a metaverse rules extension:

Public Class MVExtensionObject
    Implements IMVSynchronization

    Public Sub Initialize() Implements IMvSynchronization.Initialize
        ' TODO: Add initialization code here.
    End Sub

    Public Sub Terminate() Implements IMvSynchronization.Terminate
        ' TODO: Add termination code here.
    End Sub

    Public Sub Provision(ByVal mventry As MVEntry) Implements IMVSynchronization.Provision
        ' TODO: Remove this throw statement if you implement this method.
        Throw New EntryPointNotImplementedException()
    End Sub

    Public Function ShouldDeleteFromMV(ByVal csentry As CSEntry, ByVal mventry As MVEntry) As Boolean Implements IMVSynchronization.ShouldDeleteFromMV

        ' TODO: Add MV deletion code here.
        Throw New EntryPointNotImplementedException()
    End Function
End Class
namespace Miis_Metaverse
{
    /// <summary>
    /// Summary description for MVExtensionObject.
    /// </summary>
    public class MVExtensionObject : IMVSynchronization
    {
        public MVExtensionObject()
        {
            //
            // TODO: Add constructor logic here.
            //
        }

        void IMVSynchronization.Initialize ()
        {
            //
            // TODO: Add initialization logic here.
            //
        }

        void IMVSynchronization.Terminate ()
        {
            //
            // TODO: Add termination logic here.
            //
        }

        void IMVSynchronization.Provision (MVEntry mventry)
        {
            //
            // TODO: Remove this throw statement if you implement this method.
            //
            throw new EntryPointNotImplementedException();
        }

        bool IMVSynchronization.ShouldDeleteFromMV (CSEntry csentry, MVEntry mventry)
        {
            //
            // TODO: Add MV deletion logic here.
            //
            throw new EntryPointNotImplementedException();
        }
    }
}

Warning

Rules extensions are run in the FIM Synchronization Service Engine's process, which is a 64-bit process. 32-bit only Rules Extensions are not supported in FIM.

See Also

Reference

IMVSynchronization

Concepts

Creating Rules Extensions