• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ProcessState类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ProcessState的典型用法代码示例。如果您正苦于以下问题:C# ProcessState类的具体用法?C# ProcessState怎么用?C# ProcessState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ProcessState类属于命名空间,在下文中一共展示了ProcessState类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Create

 /// <summary>
 /// Creates a processing result with the specified state.
 /// </summary>
 /// <param name="state">The state.</param>
 /// <param name="message">The message.</param>
 /// <returns></returns>
 public static ProcessResult Create(ProcessState state, string message)
 {
     var result = new ProcessResult();
     result.State = state;
     result.Message = message;
     return result;
 }
开发者ID:CragonGame,项目名称:GameCloud.IM,代码行数:13,代码来源:ProcessResult.cs


示例2: ProcessReturnValue

 public ProcessReturnValue()
 {
     this.fileName = "result";
     this.status = ProcessState.Accepted;
     this.statusMessage = "";
     this.returnValues = new List<OutputData>();
     this.responseForm = new ResponseFormType("wps:ResponseForm");
 }
开发者ID:salomonT,项目名称:wps-net,代码行数:8,代码来源:ProcessReturnValue.cs


示例3: Start

 public void Start()
 {
     thread = new Thread(new ThreadStart(Run));
     thread.IsBackground = true;
     isRun = true;
     thread.SetApartmentState(ApartmentState.STA);
     thread.Start();
     state = ProcessState.Stared;
 }
开发者ID:Guoyingbin,项目名称:HNXC_WCS,代码行数:9,代码来源:AbstractProcess.cs


示例4: Fail

 public void Fail()
 {
     if (State == ProcessState.Running || State == ProcessState.Paused)
     {
         State = ProcessState.Succeeded;
         return;
     }
     throw new InvalidOperationException("Invalid process transition. Process must be either running or paused to fail.");
 }
开发者ID:makesj,项目名称:vienna,代码行数:9,代码来源:Process.cs


示例5: FireStateChange

 public void FireStateChange(int processId, ProcessState newState)
 {
     try
     {
         vertexScheduler.ProcessChangeState(processId, newState);
     }
     catch (Exception e)
     {
         DryadLogger.LogError(0, e, "Failed to change state to {0} for process {1}", newState.ToString(), processId);
     }
 }
开发者ID:KarthikTunga,项目名称:Dryad,代码行数:11,代码来源:VertexCallbackService.cs


示例6: DownloadDialogModel

        public DownloadDialogModel(Encoder encoder, Video video)
        {
            this.encoder = encoder;
            this.encoder.OnEncodeProgress += EncoderOnEncodeProgress;
            this.encoder.OnEncodeFinished += EncoderOnEncodeFinished;

            this.video = video;

            title = TitleDownloading;
            active = true;
            state = ProcessState.Downloading;
        }
开发者ID:FlyingPie,项目名称:BeatsByBauk,代码行数:12,代码来源:DownloadDialogModel.cs


示例7: DistributedProcessModel

 public DistributedProcessModel(string host, string process, string path, int portNum, bool local)
 {
     hostName = host;
     processName = process;
     processPath = path;
     port = portNum;
     arguments.Add(host);
     arguments.Add(port.ToString());
     procState = ProcessState.Stopped;
     routing = new RouteModel(host, port - 10000, local);
     routing.openServerSocket();
 }
开发者ID:walterscarborough,项目名称:distributed-test-environment,代码行数:12,代码来源:DistributedProcessModel.cs


示例8: DoInstruction

 public override void DoInstruction(ExpressionMediator exm, InstructionLine func, ProcessState state)
 {
     ExpressionArrayArgument intExpArg = (ExpressionArrayArgument)func.Argument;
     Int64 integer = -1;
     foreach (IOperandTerm int64Term in intExpArg.TermList)
     {
         integer = int64Term.GetIntValue(exm);
         if(isDel)
             exm.VEvaluator.DelCharacter(integer);
         else
             exm.VEvaluator.AddCharacter(integer, isSp);
     }
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:13,代码来源:Instraction.Child.cs


示例9: Debug

 public void Debug(int processID)
 {
     debugger = new CorDebugger(CorDebugger.GetDefaultDebuggerVersion());
     process = debugger.DebugActiveProcess(processID, false);
     process.OnException += OnException;
     process.OnCreateAppDomain += OnNewAppDomain;
     process.OnProcessExit += OnExit;
     process.OnModuleLoad += OnModuleLoad;
     process.OnBreakpoint += OnBreakpoint;
     process.OnStepComplete += OnStepComplete;
     process.Continue(false);
     state = ProcessState.Started;
     subscriber.Published(string.Format("Successfully attached to Process with ID [{0}]", processID));
 }
开发者ID:asengupta,项目名称:DllDbg,代码行数:14,代码来源:DllDebugger.cs


示例10: StartProcess

        public void StartProcess()
        {
            State = ProcessState.Running;

            _programData.Lot.LotProgress = 0;
            for (int w = 0; w < 5; w++)
            {
                _programData.Lot.WaferProgress = 0;
                _programData.Lot.WaferId = (w + 1).ToString();
                for (int d = 0; d < 100; d++)
                {
                    Thread.Sleep(20);
                    _programData.Lot.WaferProgress = d;
                }
                _programData.Lot.WaferProgress = 100;
                _programData.Lot.WaferId = "";
                Thread.Sleep(100);
                _programData.Lot.LotProgress = 20 * (w + 1);
            }
            _programData.Lot.LotProgress = 100;

            State = ProcessState.Idle;
        }
开发者ID:bashocz,项目名称:Examples,代码行数:23,代码来源:CoreManager.cs


示例11: LoadModuleFromFile

 public void LoadModuleFromFile(string fileName)
 {
     GBDebug.Assert(prState == ProcessState.NotLoaded, "Process state error. It is " + prState + ". It must be " + ProcessState.NotLoaded);
     name = fileName;
     completeFileName = GBFileSystem.CompleteFileNameForFile(baseDir, fileName + "." + ModuleExtension);
     if (GBFileSystem.FileExists(completeFileName))
     {
         assembly = Assembly.LoadFrom(completeFileName);
         GBDebug.Assert(assembly != null, "Assembly " + fileName + " cannot be loaded");
         prState = ProcessState.PendingValidation;
     }
     else
     {
         prState = ProcessState.InitError;
         throw new GBException(GBException.Reason.FileNotFound);
     }
 }
开发者ID:remy22,项目名称:GameBox,代码行数:17,代码来源:Process.cs


示例12: LoadMetadata

 public void LoadMetadata(string fileName)
 {
     GBDebug.Assert(prState == ProcessState.NotLoaded, "Process state error. It is " + prState + ". It must be " + ProcessState.NotLoaded);
     completePropertiesFileName = GBFileSystem.CompleteFileNameForFile(baseDir, fileName + "." + MetaDataExtension);
     if (GBFileSystem.FileExists(completePropertiesFileName))
     {
         metadata = GBXMLContainer.LoadOrNull(completePropertiesFileName);
         GBDebug.WriteLine(metadata);
     }
     else
     {
         prState = ProcessState.InitError;
         throw new GBException(GBException.Reason.FileNotFound);
     }
 }
开发者ID:remy22,项目名称:GameBox,代码行数:15,代码来源:Process.cs


示例13: DownloaderRunWorkerCompleted

        private void DownloaderRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            title = TitleEncoding;
            state = ProcessState.Encoding;

            SetChanged();
        }
开发者ID:FlyingPie,项目名称:BeatsByBauk,代码行数:7,代码来源:DownloadDialogModel.cs


示例14: CloneParentOperation

        CommandResult CloneParentOperation(SingleSteppingEngine new_thread)
        {
            if (parent.current_state == ProcessState.SingleThreaded) {
                current_state = ProcessState.SingleThreaded;
                return new ThreadCommandResult (new_thread.Thread);
            }

            if (parent.current_state != ProcessState.Running)
                throw new InternalError ();

            current_state = ProcessState.Running;
            if ((parent.current_operation.ThreadingModel & ThreadingModel.ThreadingMode) == ThreadingModel.Global)
                current_operation = parent.current_operation;
            else if ((parent.current_operation.ThreadingModel & ThreadingModel.ThreadingMode) == ThreadingModel.Process)
                current_operation = new ProcessCommandResult (this, parent.current_operation.ThreadingModel);
            else
                throw new InternalError ();

            return current_operation;
        }
开发者ID:baulig,项目名称:debugger,代码行数:20,代码来源:Process.cs


示例15: StartOperation

        internal CommandResult StartOperation(ThreadingModel model, SingleSteppingEngine caller)
        {
            if (!ThreadManager.InBackgroundThread)
                throw new InternalError ();

            if ((current_state != ProcessState.Stopped) && (current_state != ProcessState.SingleThreaded))
                throw new TargetException (TargetError.NotStopped);

            if ((model & ThreadingModel.ThreadingMode) == ThreadingModel.Single) {
                current_state = ProcessState.SingleThreaded;
                if ((model & ThreadingModel.ResumeThreads) != 0)
                    ResumeUserThreads (model, caller);
                return new ThreadCommandResult (caller.Thread);
            } else if ((model & ThreadingModel.ThreadingMode) != ThreadingModel.Process) {
                throw new ArgumentException ();
            }

            lock (this) {
                current_state = ProcessState.Running;
                stopped_event.Reset ();
                current_operation = new ProcessCommandResult (this, model);
            }

            ResumeUserThreads (model, caller);
            return current_operation;
        }
开发者ID:baulig,项目名称:debugger,代码行数:26,代码来源:Process.cs


示例16: OperationCompleted

        internal void OperationCompleted(SingleSteppingEngine caller, TargetEventArgs result, ThreadingModel model)
        {
            if (!ThreadManager.InBackgroundThread && Inferior.HasThreadEvents)
                throw new InternalError ();

            if (current_state == ProcessState.Stopping)
                return;
            else if (current_state != ProcessState.Running)
                throw new InternalError ();

            if ((result != null) && (caller != main_thread) &&
                ((result.Type == TargetEventType.TargetExited) || (result.Type == TargetEventType.TargetSignaled)))
                return;

            current_state = ProcessState.Stopping;
            SuspendUserThreads (model, caller);

            lock (this) {
                current_state = ProcessState.Stopped;
                current_operation.Completed ();
                current_operation = null;
                stopped_event.Set ();
            }
        }
开发者ID:baulig,项目名称:debugger,代码行数:24,代码来源:Process.cs


示例17: DoInstruction

 public virtual void DoInstruction(ExpressionMediator exm, InstructionLine func, ProcessState state)
 {
     throw new ExeEE("未実装 or 呼び出しミス");
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:4,代码来源:Instruction.cs


示例18: Start

        internal void Start()
        {
            GBDebug.Assert(prState == ProcessState.StartPending, "Process state error. It is " + prState + ". It must be " + ProcessState.StartPending);
            GBInfo.WriteLine("Starting process " + assembly.GetName());

            // FIXME: Doing nothing
            userProcess.Start();

            if (currentScene != null)
                currentScene.LoadNotLoadedResources();

            prState = ProcessState.Running;
        }
开发者ID:remy22,项目名称:GameBox,代码行数:13,代码来源:Process.cs


示例19: CheckValidity

 public bool CheckValidity()
 {
     try
     {
         GBDebug.WriteLine(assembly);
         GBDebug.Assert(prState == ProcessState.PendingValidation, "Process state error. It is " + prState + ". It must be " + ProcessState.PendingValidation);
         userProcess = (GBProcess)assembly.CreateInstance(ProcessMainClass);
         if (userProcess == null)
         {
             prState = ProcessState.InitError;
             GBInfo.WriteLine(ProcessMainClass + " not found.");
             return false;
         }
         prState = ProcessState.StartPending;
         return true;
     }
     catch (Exception)
     {
         prState = ProcessState.InitError;
         return false;
     }
 }
开发者ID:remy22,项目名称:GameBox,代码行数:22,代码来源:Process.cs


示例20: OnProcessExitedEvent

        internal void OnProcessExitedEvent()
        {
            DropGlobalThreadLock ();

            if (current_state == ProcessState.Running) {
                current_state = ProcessState.Exited;
                current_operation.Completed ();
                current_operation = null;
                stopped_event.Set ();
            }

            if (!is_forked)
                session.OnProcessExited (this);
            session.MainThreadGroup.RemoveThread (main_thread.ID);
            manager.Debugger.OnProcessExitedEvent (this);
        }
开发者ID:baulig,项目名称:debugger,代码行数:16,代码来源:Process.cs



注:本文中的ProcessState类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ProcessedPacket类代码示例发布时间:2022-05-24
下一篇:
C# ProcessStartInfo类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap