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

C# Procedure类代码示例

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

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



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

示例1: GetImageFromGoogleCharts

        Image GetImageFromGoogleCharts(Dimensions dimensions)
        {
            var chl = "&chl=" + Uri.EscapeDataString(GetValue<string>("text"));
              var chs = string.Format("&chs={0}x{1}", dimensions.Width,
                  dimensions.Height);
              var choe = "&choe=" + GetEncodingString();
              var chld = string.Format("&chld={0}|{1}", GetValue<string>("error_correction"),
                   GetValue<int>("margin"));
              var url = "http://chart.apis.google.com/chart?cht=qr"
            + chl + chs + choe + chld;

              var procedure = new Procedure("file-uri-load");

              try
            {
              var returnArgs = procedure.Run(url, url);

              return returnArgs[0] as Image;
            }
              catch (GimpSharpException e)
            {
              new Message(e.Message);
              return null;
            }
        }
开发者ID:unhammer,项目名称:gimp-sharp,代码行数:25,代码来源:Renderer.cs


示例2: Transform

		public void Transform(Procedure proc)
		{
            foreach (var stm in proc.Statements)
            {
                stm.Instruction.Accept(this);
            }
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:7,代码来源:MemReplacer.cs


示例3: Add

 public void Add(Procedure proc)
 {
     ++procCount;
     Program.Procedures[Address.Ptr32(procCount * 0x1000u)] = proc;
     Program.CallGraph.AddProcedure(proc);
     nameToProcedure[proc.Name] = proc;
 }
开发者ID:gh0std4ncer,项目名称:reko,代码行数:7,代码来源:ProgramBuilder.cs


示例4: LiveCopyInserter

		public LiveCopyInserter(Procedure proc, SsaIdentifierCollection ssaIds)
		{
			this.proc = proc;
			this.ssaIds = ssaIds;
			this.sla = new SsaLivenessAnalysis(proc, ssaIds);
			this.doms = proc.CreateBlockDominatorGraph();
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:7,代码来源:LiveCopyInserter.cs


示例5: GetParameters

 public IEnumerable<Parameter> GetParameters(Procedure storedProcedure)
 {
     var parameters = _sqlReflection.ProcedureArguments
         .Where(p => p.Item1.InvariantEquals(storedProcedure.Name))
         .Select(p => new Parameter(p.Item2, p.Item3, p.Item4));
     return parameters;
 }
开发者ID:prusinek74,项目名称:Simple.Data.Oracle,代码行数:7,代码来源:OracleSchemaProvider.cs


示例6: Test_Constructor

        public void Test_Constructor()
        {
            Procedure procedure = new Procedure();
            DocumentationProcedureStep procedureStep = new DocumentationProcedureStep(procedure);

            Assert.AreEqual(procedure, procedureStep.Procedure);
        }
开发者ID:emmandeb,项目名称:ClearCanvas-1,代码行数:7,代码来源:DocumentationProcedureStepTests.cs


示例7: GetServices

 public static Schema.KRPC.Services GetServices()
 {
     var services = new Schema.KRPC.Services ();
     foreach (var serviceSignature in Services.Instance.Signatures.Values) {
         var service = new Schema.KRPC.Service ();
         service.Name = serviceSignature.Name;
         foreach (var procedureSignature in serviceSignature.Procedures.Values) {
             var procedure = new Procedure ();
             procedure.Name = procedureSignature.Name;
             if (procedureSignature.HasReturnType)
             {
                 procedure.HasReturnType = true;
                 procedure.ReturnType = TypeUtils.GetTypeName (procedureSignature.ReturnType);
             }
             foreach (var parameterSignature in procedureSignature.Parameters) {
                 var parameter = new Parameter ();
                 parameter.Name = parameterSignature.Name;
                 parameter.Type = TypeUtils.GetTypeName (parameterSignature.Type);
                 if (parameterSignature.HasDefaultArgument)
                 {
                     parameter.HasDefaultArgument = true;
                     parameter.DefaultArgument = parameterSignature.DefaultArgument;
                 }
                 procedure.Parameters.Add (parameter);
             }
             foreach (var attribute in procedureSignature.Attributes) {
                 procedure.Attributes.Add (attribute);
             }
             if (procedureSignature.Documentation != "")
                 procedure.Documentation = procedureSignature.Documentation;
             service.Procedures.Add (procedure);
         }
         foreach (var clsSignature in serviceSignature.Classes.Values) {
             var cls = new Class ();
             cls.Name = clsSignature.Name;
             if (clsSignature.Documentation != "")
                 cls.Documentation = clsSignature.Documentation;
             service.Classes.Add (cls);
         }
         foreach (var enmSignature in serviceSignature.Enumerations.Values) {
             var enm = new Enumeration ();
             enm.Name = enmSignature.Name;
             if (enmSignature.Documentation != "")
                 enm.Documentation = enmSignature.Documentation;
             foreach (var enmValueSignature in enmSignature.Values) {
                 var enmValue = new EnumerationValue ();
                 enmValue.Name = enmValueSignature.Name;
                 enmValue.Value = enmValueSignature.Value;
                 if (enmValueSignature.Documentation != "")
                     enmValue.Documentation = enmValueSignature.Documentation;
                 enm.Values.Add (enmValue);
             }
             service.Enumerations.Add (enm);
         }
         if (serviceSignature.Documentation != "")
             service.Documentation = serviceSignature.Documentation;
         services.Services_.Add (service);
     }
     return services;
 }
开发者ID:artwhaley,项目名称:krpc,代码行数:60,代码来源:KRPC.cs


示例8: ApplySignatureToProcedure

        public void ApplySignatureToProcedure(Address addr, ProcedureSignature sig, Procedure proc)
        {
            proc.Signature = sig;

            int i = 0;
            var stmts = proc.EntryBlock.Succ[0].Statements;
            var linAddr = addr.ToLinear();
            foreach (var param in sig.Parameters)
            {
                var starg = param.Storage as StackArgumentStorage;
                if (starg != null)
                {
                    proc.Frame.EnsureStackArgument(
                        starg.StackOffset + sig.ReturnAddressOnStack,
                        param.DataType,
                        param.Name);
                }
                else
                {
                    var paramId = proc.Frame.EnsureIdentifier(param.Storage);
                    paramId.DataType = param.DataType;

                    // Need to take an extra step with parameters being passed
                    // in a register. It's perfectly possible for a user to 
                    // create a variable which they want to call 'r2' but which
                    // the calling convention of the machine wants to call 'r1'.
                    // To avoid this, we create a temporary identifier for 
                    // the formal parameter, and inject an copy statement in the
                    // entry block that moves the parameter value into the 
                    // register.
                    stmts.Insert(i, linAddr, NewMethod(param, paramId));
                    ++i;
                }
            }
        }
开发者ID:gitter-badger,项目名称:reko,代码行数:35,代码来源:UserSignatureBuilder.cs


示例9: DisplayProcedure

 public void DisplayProcedure(Procedure proc)
 {
     if (proc == null)
         return;
     ShowWindow("codeViewerWindow", "Code Viewer", pane);
     pane.DisplayProcedure(proc);
 }
开发者ID:gh0std4ncer,项目名称:reko,代码行数:7,代码来源:CodeViewerServiceImpl.cs


示例10: Test_Constructor_Procedure

        public void Test_Constructor_Procedure()
        {
            Procedure procedure = new Procedure();
            InterpretationStep procedureStep = new InterpretationStep(procedure);

            Assert.IsNull(procedureStep.ReportPart);
        }
开发者ID:emmandeb,项目名称:ClearCanvas-1,代码行数:7,代码来源:InterpretationStepTests.cs


示例11: GetParameters

        public IEnumerable<Parameter> GetParameters(Procedure storedProcedure)
        {
            var list = new List<Parameter>();

            using (var connection = _connectionProvider.CreateConnection())
            {
                connection.Open();

                var command = connection.CreateCommand();
                command.CommandType = CommandType.Text;
                command.CommandText =
                    string.Format("SELECT * FROM information_schema.parameters WHERE SPECIFIC_NAME = '{0}';",
                        storedProcedure.Name);

                using (var reader = command.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        list.Add(new Parameter
                        (
                            reader["PARAMETER_NAME"].ToString(),
                            SqlTypeResolver.GetClrType(reader["DATA_TYPE"].ToString()),
                            GetParameterDirection(reader["PARAMETER_MODE"].ToString()),
                            MysqlColumnInfo.GetDbType(reader["DATA_TYPE"].ToString()),
                            Convert.IsDBNull(reader["CHARACTER_MAXIMUM_LENGTH"]) ? -1 : Convert.ToInt32(reader["CHARACTER_MAXIMUM_LENGTH"])
                        ));
                    }
                }

                connection.Close();

                return list;
            }

        }
开发者ID:hojm,项目名称:Simple.Data.Mysql,代码行数:35,代码来源:MysqlSchemaDataProvider50.cs


示例12: Test_Name

        public void Test_Name()
        {
            Procedure procedure = new Procedure();
            InterpretationStep procedureStep = new InterpretationStep(procedure);

            Assert.AreEqual("Interpretation", procedureStep.Name);
        }
开发者ID:emmandeb,项目名称:ClearCanvas-1,代码行数:7,代码来源:InterpretationStepTests.cs


示例13: TryAutoTerminateProcedureSteps

		protected void TryAutoTerminateProcedureSteps(Procedure procedure, DateTime? time, IWorkflow workflow)
		{
			foreach (var mps in procedure.ModalityProcedureSteps)
			{
				// if the MPS is not terminated and has some MPPS
				if(!mps.IsTerminated && !mps.PerformedSteps.IsEmpty)
				{
					var allMppsDiscontinued = CollectionUtils.TrueForAll(mps.PerformedSteps,
						(PerformedProcedureStep pps) => pps.State == PerformedStepStatus.DC);
					var allMppsTerminated = CollectionUtils.TrueForAll(mps.PerformedSteps,
						(PerformedProcedureStep pps) => pps.IsTerminated);

					if (allMppsDiscontinued)
					{
						// discontinue MPS, since all MPPS are discontinued
						mps.Discontinue(time);
					}
					else if (allMppsTerminated)
					{
						// all MPPS are terminated, and at least one MPPS must be completed, so complete MPS
						mps.Complete(time);
					}
				}
			}
		}
开发者ID:nhannd,项目名称:Xian,代码行数:25,代码来源:Operations.cs


示例14: SegmentedAccessClassifier

 public SegmentedAccessClassifier(Procedure proc, SsaIdentifierCollection ssaIds)
 {
     this.proc = proc;
     this.ssaIds = ssaIds;
     assocs = new Dictionary<Identifier,Identifier>();
     consts = new Dictionary<Identifier, Constant>();
 }
开发者ID:nemerle,项目名称:reko,代码行数:7,代码来源:SegmentedAccessClassifier.cs


示例15: Test_Name

        public void Test_Name()
        {
            Procedure procedure = new Procedure();
            DocumentationProcedureStep procedureStep = new DocumentationProcedureStep(procedure);

            Assert.AreEqual("Documentation", procedureStep.Name);
        }
开发者ID:emmandeb,项目名称:ClearCanvas-1,代码行数:7,代码来源:DocumentationProcedureStepTests.cs


示例16: BuildSignature

        public bool BuildSignature(Address addr, Procedure proc)
        {
            Procedure_v1 userProc;
            if (program.User.Procedures.TryGetValue(addr, out userProc))
            {
                var sProc = DeserializeSignature(userProc, proc);
                if (sProc != null)
                {
                    var ser = program.CreateProcedureSerializer();
                    var sig = ser.Deserialize(sProc.Signature, proc.Frame);
                    if (sig != null)
                    {
                        proc.Name = sProc.Name;
                        ApplySignatureToProcedure(addr, sig, proc);
                        return true;
                    }
                }
            }

            if (proc.Signature.ParametersValid)
            {
                ApplySignatureToProcedure(addr, proc.Signature, proc);
                return true;
            }
            return false;
        }
开发者ID:relaxar,项目名称:reko,代码行数:26,代码来源:UserSignatureBuilder.cs


示例17: Test_IsPreStep

        public void Test_IsPreStep()
        {
            Procedure procedure = new Procedure();
            DocumentationProcedureStep procedureStep = new DocumentationProcedureStep(procedure);

            Assert.IsFalse(procedureStep.IsPreStep);
        }
开发者ID:emmandeb,项目名称:ClearCanvas-1,代码行数:7,代码来源:DocumentationProcedureStepTests.cs


示例18: Page_Init

    protected void Page_Init(object sender, EventArgs e)
    {
        ctx = new AriClinicContext("AriClinicContext");
        // security control, it must be a user logged
        if (Session["User"] == null)
            Response.Redirect("Default.aspx");
        else
        {
            user = CntAriCli.GetUser((Session["User"] as User).UserId, ctx);
            Process proc = (from p in ctx.Processes
                            where p.Code == "procedure"
                            select p).FirstOrDefault<Process>();
            per = CntAriCli.GetPermission(user.UserGroup, proc, ctx);
            btnAccept.Visible = per.Modify;
        }

        // 
        if (Request.QueryString["ProcedureId"] != null)
        {
            procedureId = Int32.Parse(Request.QueryString["ProcedureId"]);
            proc = CntAriCli.GetProcedure(procedureId, ctx);
            LoadData(proc);
        }
        // Allways read parameter
        parameter = CntAriCli.GetParameter(ctx);
    }
开发者ID:ragare62,项目名称:AriClinic,代码行数:26,代码来源:ProcedureForm.aspx.cs


示例19: Prior

		public Prior(Report r, Procedure rp, ProcedureType pt, Order o)
		{
			this.Report = r;
			this.Procedure = rp;
			this.ProcedureType = pt;
			this.Order = o;
		}
开发者ID:nhannd,项目名称:Xian,代码行数:7,代码来源:IPriorReportBroker.cs


示例20: Setup

 public void Setup()
 {
     mr = new MockRepository();
     program = new Program();
     proc = new Procedure("testProc", new Frame(PrimitiveType.Word32));
     block = proc.AddBlock("l00100000");
     trace = new RtlTrace(0x00100000);
     r0 = new Identifier("r0", PrimitiveType.Word32, new RegisterStorage("r0", 0, 0, PrimitiveType.Word32));
     r1 = new Identifier("r1", PrimitiveType.Word32, new RegisterStorage("r1", 1, 0, PrimitiveType.Word32));
     r2 = new Identifier("r2", PrimitiveType.Word32, new RegisterStorage("r2", 2, 0, PrimitiveType.Word32));
     sp = new Identifier("sp", PrimitiveType.Word32, new RegisterStorage("sp", 15, 0, PrimitiveType.Word32));
     grf = proc.Frame.EnsureFlagGroup(Registers.eflags, 3, "SCZ", PrimitiveType.Byte);
     var sc = new ServiceContainer();
     var listener = mr.Stub<DecompilerEventListener>();
     scanner = mr.StrictMock<IScanner>();
     arch = mr.Stub<IProcessorArchitecture>();
     program.Architecture = arch;
     program.SegmentMap = new SegmentMap(
         Address.Ptr32(0x00100000),
         new ImageSegment(
             ".text",
             new MemoryArea(Address.Ptr32(0x00100000), new byte[0x20000]),
             AccessMode.ReadExecute));
     arch.Replay();
     program.Platform = new DefaultPlatform(null, arch);
     arch.BackToRecord();
     arch.Stub(s => s.StackRegister).Return((RegisterStorage)sp.Storage);
     arch.Stub(s => s.PointerType).Return(PrimitiveType.Pointer32);
     scanner.Stub(s => s.Services).Return(sc);
     sc.AddService<DecompilerEventListener>(listener);
 }
开发者ID:relaxar,项目名称:reko,代码行数:31,代码来源:BlockWorkitemTests.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Process类代码示例发布时间:2022-05-24
下一篇:
C# ProcInfo类代码示例发布时间: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