コード例 #1
0
ファイル: Flatten.cs プロジェクト: nofuture-git/31g
        /// <summary>
        /// Creates a new wrapper around the remote process.
        /// </summary>
        /// <param name="ports"></param>
        /// <remarks>
        /// See the detailed notes on its sister type <see cref="AssemblyAnalysis"/> ctor.
        /// While not exact in terms of what its doing - it is exact in terms of how it does it.
        /// </remarks>
        public Flatten(params int[] ports)
        {
            if (string.IsNullOrWhiteSpace(NfConfig.CustomTools.InvokeFlatten) || !File.Exists(NfConfig.CustomTools.InvokeFlatten))
            {
                throw new ItsDeadJim("Don't know where to locate the NoFuture.Util.Tokens.InvokeFlatten.exe, assign " +
                                     "the global variable at NoFuture.Tools.CustomTools.InvokeFlatten.");
            }
            var args           = string.Empty;
            var getFlatAsmPort = DefaultPort;

            if (ports != null && ports.Length > 0)
            {
                getFlatAsmPort = ports[0];
                args           = ConsoleCmd.ConstructCmdLineArgs(GET_FLAT_ASM_PORT_CMD_SWITCH,
                                                                 getFlatAsmPort.ToString(CultureInfo.InvariantCulture));
            }

            MyProcess = StartRemoteProcess(NfConfig.CustomTools.InvokeFlatten, args);

            _invokeGetFlattenAssemblyCmd = new InvokeGetFlattenAssembly()
            {
                ProcessId  = MyProcess.Id,
                SocketPort = getFlatAsmPort
            };
        }
コード例 #2
0
ファイル: Flatten.cs プロジェクト: nofuture-git/31g
        /// <summary>
        /// Creates a new wrapper around the remote process. 
        /// </summary>
        /// <param name="ports"></param>
        /// <remarks>
        /// See the detailed notes on its sister type <see cref="AssemblyAnalysis"/> ctor.
        /// While not exact in terms of what its doing - it is exact in terms of how it does it.
        /// </remarks>
        public Flatten(params int[] ports)
        {
            if (string.IsNullOrWhiteSpace(CustomTools.InvokeFlatten) || !File.Exists(CustomTools.InvokeFlatten))
                throw new ItsDeadJim("Don't know where to locate the NoFuture.Util.Gia.InvokeFlatten.exe, assign " +
                                     "the global variable at NoFuture.Tools.CustomTools.InvokeFlatten.");
            var args = string.Empty;
            var getFlatAsmPort = DF_START_PORT;
            if (ports != null && ports.Length > 0)
            {
                getFlatAsmPort = ports[0];
                args = ConsoleCmd.ConstructCmdLineArgs(GET_FLAT_ASM_PORT_CMD_SWITCH,
                    getFlatAsmPort.ToString(CultureInfo.InvariantCulture));
            }

            MyProcess = StartRemoteProcess(CustomTools.InvokeFlatten,args);

            _invokeGetFlattenAssemblyCmd = new InvokeGetFlattenAssembly()
            {
                ProcessId = MyProcess.Id,
                SocketPort = getFlatAsmPort
            };
        }