示例#1
0
        public static VstsUserEntity GetUserVSTSInstance(
            [ActivityTrigger] string userOID,
            ILogger log
            )
        {
            // Parse the connection string and return a reference to the storage account.
            var connectionString = Environment.GetEnvironmentVariable("SkillsBundleTablesConnectionsString");
            var vstsUserService  = new VstsUserService(connectionString);

            return(vstsUserService.Get(userOID));
        }
示例#2
0
        public static void Add(
            [ActivityTrigger] VSTSUserIntegrationContext vstsUserIntegrationContext,
            ILogger log
            )
        {
            // Parse the connection string and return a reference to the storage account.
            var connectionString = Environment.GetEnvironmentVariable("SkillsBundleTablesConnectionsString");
            var vstsUserService  = new VstsUserService(connectionString);
            var vstsUserEntity   = new VstsUserEntity(vstsUserIntegrationContext.UserOID, vstsUserIntegrationContext.VstsInstance
                                                      , vstsUserIntegrationContext.VstsUserId);

            vstsUserService.Add(vstsUserEntity);
        }