/// <summary>
 /// Creates a new instance of ServiceFailedException by adding the server definition info to the given message
 /// </summary>
 internal static ServiceFailedException CreateException(string message, ServerDefinition serverDefinition, Exception innerException)
 {
     return(new ServiceFailedException(
                string.Format(CultureInfo.CurrentCulture, message,
                              serverDefinition != null ? serverDefinition.ServerType : string.Empty,
                              serverDefinition != null ? serverDefinition.Category : string.Empty), innerException));
 }
Пример #2
0
 public DatabaseInstanceInfo(ServerDefinition serverDefinition, string serverName, string databaseName)
 {
     ServerInstanceInfo = new ServerInstanceInfo(serverDefinition)
     {
         Name = serverName
     };
     Name = databaseName;
 }
        public AzureServerDatabaseDiscoveryProvider(IAzureResourceManager azureResourceManager, IAzureResourceManagementSession session, ServerDefinition serverDefinition)
        {
            CommonUtil.CheckForNull(session, "session");
            CommonUtil.CheckForNull(azureResourceManager, "azureResourceManager");
            _session             = session;
            AzureResourceManager = azureResourceManager;

            ServerDefinition = serverDefinition ?? ServerDefinition.Default;
        }