コード例 #1
0
        private static IRelativityContext VerifyContext(IRelativityContext context)
        {
            if (context.WorkspaceId <= 0)
            {
                throw new ArgumentException("Context does not contain a valid WorkspaceId");
            }

            return(context);
        }
コード例 #2
0
 public RsapiClientFactory(IHelper helper, IRelativityContext context, ExecutionIdentity defaultExecutionIdentity)
     : base(helper, defaultExecutionIdentity)
 {
     this.context = context;
 }
コード例 #3
0
 public RsapiClientFactory(IHelper helper, IRelativityContext context)
     : base(helper)
 {
     this.context = context;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RelativityConnectionFactoryBase"/> class.
 /// </summary>
 /// <param name="helper">The Relativity helper for the instance.</param>
 /// <param name="context">The workspace wanted.</param>
 protected RelativityConnectionFactoryBase(IHelper helper, IRelativityContext context)
 {
     this.helper  = helper;
     this.context = context;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RelativityWorkspaceConnectionFactory"/> class.
 /// </summary>
 /// <param name="helper">The Relativity helper for the instance.</param>
 /// <param name="context">The workspace wanted.</param>
 public RelativityWorkspaceConnectionFactory(IHelper helper, IRelativityContext context)
     : base(helper, VerifyContext(context))
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RelativityInstanceConnectionFactory"/> class.
 /// </summary>
 /// <param name="helper">The Relativity helper for the instance.</param>
 /// <param name="context">The workspace wanted.</param>
 public RelativityInstanceConnectionFactory(RelativityAPI.IHelper helper, IRelativityContext context)
     : base(helper, context.GetInstanceContext())
 {
 }