Exemplo n.º 1
0
 private void DisposeInternal()
 {
     if (_rdcLibrary != null)
     {
         Marshal.ReleaseComObject(_rdcLibrary);
         _rdcLibrary = null;
     }
 }
Exemplo n.º 2
0
		private void DisposeInternal()
		{
			if (_rdcLibrary != null)
			{
				Marshal.ReleaseComObject(_rdcLibrary);
				_rdcLibrary = null;
			}
		}
Exemplo n.º 3
0
		public NeedListGenerator(ISignatureRepository seedSignatureRepository, ISignatureRepository sourceSignatureRepository)
		{
			try
			{
				_rdcLibrary = (IRdcLibrary)new RdcLibrary();
			}
			catch (InvalidCastException e)
			{
				throw new InvalidOperationException("This have to run in an MTA thread", e);
			}
			_seedSignatureRepository = seedSignatureRepository;
			_sourceSignatureRepository = sourceSignatureRepository;
		}
Exemplo n.º 4
0
 public NeedListGenerator(ISignatureRepository seedSignatureRepository, ISignatureRepository sourceSignatureRepository)
 {
     try
     {
         _rdcLibrary = (IRdcLibrary) new RdcLibrary();
     }
     catch (InvalidCastException e)
     {
         throw new InvalidOperationException("This have to run in an MTA thread", e);
     }
     _seedSignatureRepository   = seedSignatureRepository;
     _sourceSignatureRepository = sourceSignatureRepository;
 }
Exemplo n.º 5
0
		public SigGenerator()
		{
			try
			{
				_rdcLibrary = (IRdcLibrary)new RdcLibrary();
			}
			catch (InvalidCastException e)
			{
				throw new InvalidOperationException("This code must run in an MTA thread", e);
			}
			catch (COMException comException)
			{
				log.ErrorException("Remote Differential Compression feature is not installed", comException);
				throw new NotSupportedException("Remote Differential Compression feature is not installed", comException);
			}
		}
Exemplo n.º 6
0
 public SigGenerator()
 {
     try
     {
         _rdcLibrary = (IRdcLibrary) new RdcLibrary();
     }
     catch (InvalidCastException e)
     {
         throw new InvalidOperationException("This code must run in an MTA thread", e);
     }
     catch (COMException comException)
     {
         log.ErrorException("Remote Differential Compression feature is not installed", comException);
         throw new NotSupportedException("Remote Differential Compression feature is not installed", comException);
     }
 }
Exemplo n.º 7
0
        public NeedListGenerator(ISignatureRepository seedSignatureRepository, ISignatureRepository sourceSignatureRepository)
        {
            if (EnvironmentUtils.RunningOnPosix)
            {
                throw new FeatureNotSupportedOnPosixException("RdcLibrary not supported when RunningOnPosix");
            }

            try
            {
                _rdcLibrary = (IRdcLibrary) new RdcLibrary();
            }
            catch (InvalidCastException e)
            {
                throw new InvalidOperationException("This have to run in an MTA thread", e);
            }
            _seedSignatureRepository   = seedSignatureRepository;
            _sourceSignatureRepository = sourceSignatureRepository;
        }
Exemplo n.º 8
0
        public SigGenerator()
        {
            if (EnvironmentUtils.RunningOnPosix)
            {
                throw new FeatureNotSupportedOnPosixException("RdcLibrary not supported when RunningOnPosix");
            }

            try
            {
                _rdcLibrary = (IRdcLibrary) new RdcLibrary();
            }
            catch (InvalidCastException e)
            {
                throw new InvalidOperationException("This code must run in an MTA thread", e);
            }
            catch (COMException comException)
            {
                log.ErrorException("Remote Differential Compression feature is not installed", comException);
                throw new NotSupportedException("Remote Differential Compression feature is not installed", comException);
            }
        }
Exemplo n.º 9
0
        /// <summary>
        /// Interrogates the RDC library version on this local machine.
        /// </summary>
        /// <returns>Current and minimum supported version.</returns>
        public static RdcVersion GetRdcVersion()
        {
            // Create our instance to the RdcLibrary
            // COM interface.
            IRdcLibrary rdcLibrary = (IRdcLibrary) new RdcLibrary();

            uint currentVersion = 0;
            uint minimumCompatibleAppVersion = 0;

            // Retrieve the RDC version.
            int hr = rdcLibrary.GetRDCVersion(
                out currentVersion,
                out minimumCompatibleAppVersion);

            if (hr != 0)
            {
                throw new RdcException("Failed to retrieve the version of the RDC server.");
            }

            // Build our managed RdcVersion object.
            return(new RdcVersion(currentVersion, minimumCompatibleAppVersion));
        }
Exemplo n.º 10
0
 public RdcServices()
 {
     // Create our instance to the RdcLibrary
     // COM interface.
     rdcLibrary = (IRdcLibrary) new RdcLibrary();
 }