ResourceServer
using Relativity.Transfer.Resources;
using System;
using System.Globalization;
namespace Relativity.Transfer
{
public sealed class ResourceServer
{
public int ArtifactId { get; set; }
public bool CloudInstance { get; set; }
public string Name { get; set; }
public ResourcePool ResourcePool { get; set; }
public ResourceServerType ResourceServerType { get; set; }
public ResourceServer()
{
ArtifactId = 0;
CloudInstance = false;
Name = null;
ResourcePool = null;
ResourceServerType = null;
}
public ResourceServer(int artifactId, string name, ResourceServerType resourceServerType, bool cloudInstance)
: this(artifactId, name, resourceServerType, null, cloudInstance)
{
}
public ResourceServer(int artifactId, string name, ResourceServerType resourceServerType, ResourcePool resourcePool, bool cloudInstance)
{
if (artifactId < 1) {
string message = string.Format(CultureInfo.CurrentCulture, CoreStrings.ArtifactOutOfRangeExceptionMessage, "Resource Server");
throw new ArgumentOutOfRangeException("artifactId", message);
}
if (string.IsNullOrEmpty(name))
throw new ArgumentNullException("name");
if (resourceServerType == null)
throw new ArgumentNullException("resourceServerType");
ArtifactId = artifactId;
Name = name;
ResourceServerType = resourceServerType;
ResourcePool = resourcePool;
CloudInstance = cloudInstance;
}
}
}