Ejemplo n.º 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();
            });
		}
Ejemplo n.º 2
0
		private static AzureUsageClient GetAzureUsageClient(string azureSubscriptionId,AddAzureSubscriptionSession record) {
			return new AzureUsageClient(new FromPKCSMetricsEndpointConfiguration(record.Pfx,record.Password,azureSubscriptionId));
		}