예제 #1
0
		internal static void StorePfxForSession(string sessionId,byte[] pfx,string password) {
			DataContext.Do(ctx=>{
			    var session = ctx.AddAzureSubscriptionSessions.Find(sessionId);
			    if(session == null) {
				    session = new AddAzureSubscriptionSession {
					    SessionId = sessionId
				    };
				    ctx.AddAzureSubscriptionSessions.Add(session);
			    }
			
			    session.Pfx = pfx;
			    session.Password = password;

			    ctx.SaveChanges();
            });
		}
예제 #2
0
		private static AzureUsageClient GetAzureUsageClient(string azureSubscriptionId,AddAzureSubscriptionSession record) {
			return new AzureUsageClient(new FromPKCSMetricsEndpointConfiguration(record.Pfx,record.Password,azureSubscriptionId));
		}