Appendix D - SQL MA Extension

Applies To: Windows Server 2008, Windows Server 2008 R2

The following is the SQL management agent.

using System;
using Microsoft.MetadirectoryServices;

namespace Mms_ManagementAgent_SQLExtension
{
    /// <summary>
    /// Summary description for MAExtensionObject.
/// </summary>
public class MAExtensionObject : IMASynchronization
{
public MAExtensionObject()
{
            //
            // 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 connector 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
//
            switch (FlowRuleName)
{
case "SidHistory":

                    if (mventry["sIDHIstory"].IsPresent)
                    {
                        csentry["SidHistoryPresent"].Value = "Y";
                    }
                    else
                    {
                        csentry["SidHistoryPresent"].Value = "N";
                    }
                    break;


default:
// TODO: remove the following statement and add your default script here
throw new EntryPointNotImplementedException();
}
        }
}
}