Advertisement
mariussm

AZURESP1 MV

Jun 1st, 2014
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.64 KB | None | 0 0
  1.  
  2. using System;
  3. using Microsoft.MetadirectoryServices;
  4.  
  5. namespace Mms_Metaverse
  6. {
  7.     /// <summary>
  8.     /// Summary description for MVExtensionObject.
  9.     /// </summary>
  10.     public class MVExtensionObject : IMVSynchronization
  11.     {
  12.         public MVExtensionObject()
  13.         {
  14.             //
  15.             // TODO: Add constructor logic here
  16.             //
  17.         }
  18.  
  19.         void IMVSynchronization.Initialize ()
  20.         {
  21.             //
  22.             // TODO: Add initialization logic here
  23.             //
  24.         }
  25.  
  26.         void IMVSynchronization.Terminate ()
  27.         {
  28.             //
  29.             // TODO: Add termination logic here
  30.             //
  31.         }
  32.  
  33.         void IMVSynchronization.Provision (MVEntry mventry)
  34.         {
  35.             // Get the External SharePoint Profile Service MA
  36.             ConnectedMA AZURESP1 = mventry.ConnectedMAs["AZURESP1"];
  37.  
  38.             // If not connected to the DNV MA
  39.             if (AZURESP1.Connectors.Count == 0 && mventry.ObjectType == "person")
  40.             {
  41.                 // Create connector
  42.                 CSEntry CSentry = AZURESP1.Connectors.StartNewConnector("user");
  43.                 CSentry["ProfileIdentifier"].StringValue = "MyGWRNDID:" + mventry["MyGWRNDID"].StringValue;
  44.                 CSentry["Anchor"].StringValue = mventry["MyGWRNDID"].StringValue;
  45.                 CSentry.CommitNewConnector();
  46.             }
  47.         }  
  48.  
  49.         bool IMVSynchronization.ShouldDeleteFromMV (CSEntry csentry, MVEntry mventry)
  50.         {
  51.             //
  52.             // TODO: Add MV deletion logic here
  53.             //
  54.             throw new EntryPointNotImplementedException();
  55.         }
  56.     }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement