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

C# PType类代码示例

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

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



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

示例1: PartialStaticCall

 public PartialStaticCall(int[] mappings, PValue[] closedArguments, PCall call,
     string memberId, PType ptype) : base(mappings, closedArguments, 0)
 {
     _ptype = ptype;
     _call = call;
     _memberId = memberId;
 }
开发者ID:SealedSun,项目名称:prx,代码行数:7,代码来源:PartialStaticCall.cs


示例2: TableView

 public TableView(string path_name, PType e_type)
 {
     tp_rec = new PTypeRecord(
         new NamedType("deleted", new PType(PTypeEnumeration.boolean)),
         new NamedType("evalue", e_type));
     table_cell = new PaCell(new PTypeSequence(tp_rec), path_name + ".pac", false);
 }
开发者ID:agmarchuk,项目名称:Polar,代码行数:7,代码来源:TableView.cs


示例3: VariableDescription

 public VariableDescription(AALocalDecl localDecl, VariableTypes type)
 {
     Name = localDecl.GetName().Text;
     Type = Util.TypeToString(localDecl.GetType());
     switch (type)
     {
         case VariableTypes.LocalVariable:
             PlacementPrefix = "Local";
             break;
         case VariableTypes.Parameter:
             PlacementPrefix = "Parameter";
             break;
         case VariableTypes.StructVariable:
             PlacementPrefix = "Struct field";
             break;
         default:
             PlacementPrefix = "";
             break;
     }
     VariableType = type;
     Const = localDecl.GetConst() != null;
     IsStatic = localDecl.GetStatic() != null;
     Visibility = localDecl.GetVisibilityModifier();
     realType = (PType) localDecl.GetType().Clone();
     init = localDecl.GetInit();
     Line = localDecl.GetName().Line;
     Position = TextPoint.FromCompilerCoords(localDecl.GetName());
 }
开发者ID:Whimsyduke,项目名称:GalaxyEditorPlusPlus,代码行数:28,代码来源:VariableDescription.cs


示例4: RingTest

    /// <summary>First half builds the ring, second half tests the connection handler...</summary>
    public void RingTest() {
      Parameters p = new Parameters("Test", "Test");
      string[] args = "-b=.2 -c --secure_senders -s=50".Split(' ');
      Assert.AreNotEqual(-1, p.Parse(args), "Unable to parse" + p.ErrorMessage);
      Simulator sim = new Simulator(p);
      _sim = sim;
      Assert.IsTrue(sim.Complete(true), "Simulation failed to complete the ring");

      SimpleTimer.RunSteps(fifteen_mins, false);
      var nm0 = sim.TakenIDs.Values[0];
      int idx = 1;
      NodeMapping nm1 = null;
      do {
        nm1 = sim.TakenIDs.Values[idx++];
      } while(Simulator.AreConnected(nm0.Node, nm1.Node) && idx < sim.TakenIDs.Count);

      Assert.IsFalse(Simulator.AreConnected(nm0.Node, nm1.Node), "Sanity check");
      var ptype = new PType("chtest");
      var ch0 = new ConnectionHandler(ptype, (StructuredNode) nm0.Node);
      var ch1 = new ConnectionHandler(ptype, (StructuredNode) nm1.Node);
      ConnectionHandlerTest(nm0.Node, nm1.Node, ch0, ch1);

      SimpleTimer.RunSteps(fifteen_mins * 2, false);

      Assert.IsFalse(Simulator.AreConnected(nm0.Node, nm1.Node), "Sanity check0");
      ptype = new PType("chtest1");
      ch0 = new SecureConnectionHandler(ptype, (StructuredNode) nm0.Node, nm0.Sso);
      ch1 = new SecureConnectionHandler(ptype, (StructuredNode) nm1.Node, nm1.Sso);
      ConnectionHandlerTest(nm0.Node, nm1.Node, ch0, ch1);
    }
开发者ID:pstjuste,项目名称:brunet,代码行数:31,代码来源:SimulatorUnit.cs


示例5: MCustomer

 public MCustomer(int id, string fName, string lName, string address, string country,
     string phone, string email, ICollection<MLogInfo> logInfos,
     PType pType, MDiscountGroup discountGroup, string payStatus)
     : base(id, fName, lName, address, country, phone, email, logInfos, pType)
 {
     DiscountGroup = discountGroup;
     PaymentStatus = payStatus;
 }
开发者ID:Dadov,项目名称:3rdsemproject,代码行数:8,代码来源:MCustomer.cs


示例6: BaseMove

 public BaseMove(string name, PType t, Category c, int initPP, int p, int a, int range = 1)
 {
     Name = name;
     MoveType = t;
     MoveCategory = c;
     BasePP = initPP;
     Power = p;
     Accuracy = a;
 }
开发者ID:CalWLee,项目名称:MonsterTactics,代码行数:9,代码来源:BaseMove.cs


示例7: initialize

 // called my manager
 public void initialize(ProjectileManager manager, PType type) {
     mesh = transform.Find("Model").gameObject;
     col = GetComponent<Collider>();
     rb = GetComponent<Rigidbody>();
     psem = transform.Find("Particles").GetComponent<ParticleSystem>().emission;
     lightComp = GetComponent<Light>();
     this.manager = manager;
     this.type = type;
     freeze = false;
     reset();
 }
开发者ID:buckslice,项目名称:statlord,代码行数:12,代码来源:Projectile.cs


示例8: HandleReply

  public bool HandleReply(ReqrepManager man, ReqrepManager.ReqrepType rt,
		   int mid,
		   PType prot,
		   MemBlock payload,
		   ISender from,
		   ReqrepManager.Statistics s,
		   object state)
  {
    Console.WriteLine("{0} got our message", from);
    return false;
  }
开发者ID:johnynek,项目名称:brunet,代码行数:11,代码来源:ReqrepExample.cs


示例9: getProjectile

    public Projectile getProjectile(PType type) {
        List<Projectile> list = poolLookup[type];
        if (list.Count <= 0) {
            buildProjectile(type);
        }

        int last = list.Count - 1;
        Projectile p = list[last];
        list.RemoveAt(last);
        p.gameObject.SetActive(true);
        return p;
    }
开发者ID:buckslice,项目名称:statlord,代码行数:12,代码来源:ProjectileManager.cs


示例10: Create

 public static Project Create(string Profolder, string Proname, PType Protype, bool Inctemplate)
 {
     Project PObject ;
     string Profile = Profolder + @"\" + Proname + @"\" + Proname + ".mpr";
     Profolder = Profolder + @"\" + Proname;
     switch (Protype) {
         case PType.Csharp:
             PObject = new Csharp(Profile);
             break;
         case PType.Databse:
             PObject = new Database(Profile);
             break;
         case PType.Hydro:
             PObject = new Hydro(Profile);
             break;
         case PType.Ilasm:
             PObject = new Ilasm(Profile);
             break;
         case PType.Java:
             PObject = new Java(Profile);
             break;
         case PType.Unmanaged:
             PObject = new Unmanaged(Profile);
             break;
         case PType.Vbasic:
             PObject = new Vbasic(Profile);
             break;
         case PType.Website:
             PObject = new Website(Profile);
             break;
         case PType.Yalamof:
             PObject = new Yalamof(Profile);
             break;
         default:
             PObject = new Unmanaged();
             break;
     }
     try
     {
         Directory.CreateDirectory(Profolder);
         if (Inctemplate == true)
         {
             PObject.CopyTemplate();
         }
         PObject.Save();
     }
     catch (Exception e)
     {
         Exceptioner.Log(e);
     }
     return PObject;
 }
开发者ID:NithinKharvi,项目名称:moo-plus,代码行数:52,代码来源:ProjectFactory.cs


示例11: MPerson

 // constructor
 public MPerson(int id, string fName, string lName, string address, string country,
     string phone, string email, ICollection<MLogInfo> logInfos, PType pType)
 {
     ID = id;
     FName = fName;
     LName = lName;
     Address = address;
     Country = country;
     Phone = phone;
     Email = email;
     LogInfos = logInfos;
     PersonType = pType;
 }
开发者ID:Dadov,项目名称:3rdsemproject,代码行数:14,代码来源:MPerson.cs


示例12: GetEvent

 private DynamicMetaObject GetEvent(DynamicMetaObject target, PType pType)
 {
     var eventName = Name + "された";
     EventInfo evInfo = null;
     var evs = pType.GetEventNames();
     pType.TryGetEvent(eventName, out evInfo);
     if (evInfo == null)
         return null;
     var ctorInfo = typeof(AddEventDelegator).GetConstructor(new[] { typeof(object), typeof(EventInfo) });
     return new DynamicMetaObject(
         Expression.New(ctorInfo, target.Expression, Expression.Constant(evInfo)),
         BindingRestrictions.GetTypeRestriction(target.Expression, target.LimitType));
 }
开发者ID:irxground,项目名称:kurogane,代码行数:13,代码来源:ProduireGetMemberBinder.cs


示例13: GetProperty

 private DynamicMetaObject GetProperty(DynamicMetaObject target, PType pType)
 {
     PPropertyInfo propInfo = null;
     pType.TryGetPropertyInfo(Name, out propInfo);
     if (propInfo == null)
         return null;
     return new DynamicMetaObject(
         Expression.Call(
             Expression.Constant(pType),
             MethodInfo,
             Expression.Constant(propInfo),
             Expression.Convert(target.Expression, InstanceType)),
         BindingRestrictions.GetTypeRestriction(target.Expression, target.LimitType));
 }
开发者ID:irxground,项目名称:kurogane,代码行数:14,代码来源:ProduireGetMemberBinder.cs


示例14: AppendPObj

 public long AppendPObj(PType tp, object valu)
 {
     long off = this.freespace;
     this.SetOffset(off);
     this.Append(tp, valu);
     if (tp.HasNoTail)
     {
         this.freespace += tp.HeadSize;
     }
     else
     {
         this.freespace = this.fs.Position;
     }
     this.nElements += 1;
     return off;
 }
开发者ID:agmarchuk,项目名称:Polar,代码行数:16,代码来源:PaCell.cs


示例15: Canoe

        /// <summary>
        /// Default constructor of a canoe
        /// </summary>
        /// <param name="serialNumber">serial number of a canoe</param>
        /// <param name="modelName">model name of a canoe</param>
        /// <param name="capacity">max passengers that can fit in a canoe</param>
        /// <param name="wholesalePrice">price we pay manufacturer for a canoe</param>
        /// <param name="retailPrice">price we charge retail stores for a canoe</param>
        /// <param name="length">length of a canoe</param>
        /// <param name="weight">weight of a canoe</param>
        /// <param name="canoebrand">brand of canoe</param>
        /// <param name="canoetype">type of a canoe</param>
        /// <param name="paddleType">paddle type need for canoe</param>
        public Canoe(string serialNumber, string modelName, int capacity, decimal wholesalePrice, decimal retailPrice, int length, int weight, CBrand canoebrand, CType canoetype, PType paddleType)
        {
            // WaterCraft
            this.SerialNumber = DefaultSN;
            this.ModelName = DefaultModelName;
            this.PassengerCapacity = DefaultPassengers;
            this.WholeSalePrice = DefaultWholeSalePrice;
            this.RetailPrice = DefaultRetailPrice;
            this.Length = DefaultLength;
            this.Weight = DefaultWeight;

            // Specific to Canoe
            this.CanoeBrand = DefaultCanoeBrand;
            this.CanoeType = DefaultCanoeType;
            this.PaddleType = DefaultPaddleType;
        }
开发者ID:BeeryTC,项目名称:NMC_DesignPatterns,代码行数:29,代码来源:Canoe.cs


示例16: SecureRingTest

 public void SecureRingTest() {
   Parameters p = new Parameters("Test", "Test");
   string[] args = "-b=.2 -c --secure_edges -s=25".Split(' ');
   Assert.AreNotEqual(-1, p.Parse(args), "Unable to parse" + p.ErrorMessage);
   Simulator sim = new Simulator(p);
   _sim = sim;
   Assert.IsTrue(sim.Complete(true), "Simulation failed to complete the ring");
   var nm0 = sim.TakenIDs.Values[0];
   int idx = 1;
   var nm1 = sim.TakenIDs.Values[idx];
   while(Simulator.AreConnected(nm0.Node, nm1.Node) && idx < sim.TakenIDs.Count) {
     nm1 = sim.TakenIDs.Values[++idx];
   }
   var ptype = new PType("chtest");
   var ch0 = new SecureConnectionHandler(ptype, (StructuredNode) nm0.Node, nm0.Sso);
   var ch1 = new SecureConnectionHandler(ptype, (StructuredNode) nm1.Node, nm1.Sso);
   ConnectionHandlerTest(nm0.Node, nm1.Node, ch0, ch1);
 }
开发者ID:acisp2p,项目名称:brunet,代码行数:18,代码来源:SimulatorUnit.cs


示例17: NewDialog

        public NewDialog(Project currentProject)
        {
            InitializeComponent();

            this.currentfolder=Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Moo Workspace";
            if (currentProject != null)
            {
                this.currentfolder = currentProject.Folder;
            }

            //initialise
            this.newoption = "PROJECT";
            this.projecttype = PType.Csharp;
            this.TypeCbx.Items.AddRange(new string[] { "C SHARP", "ILASM", "HYDRO", "V BASIC" });
            this.NameTbx.Text="";
            this.FolderTbx.Text = this.currentfolder;
            this.TypeCbx.SelectedIndex = 0;
        }
开发者ID:NithinKharvi,项目名称:moo-plus,代码行数:18,代码来源:NewDialog.cs


示例18: RingTest

 /// <summary>First half builds the ring, second half tests the connection handler...</summary>
 public void RingTest() {
   Parameters p = new Parameters("Test", "Test");
   string[] args = "-b=.2 -c -s=50".Split(' ');
   Assert.AreNotEqual(-1, p.Parse(args), "Unable to parse" + p.ErrorMessage);
   Simulator sim = new Simulator(p);
   _sim = sim;
   Assert.IsTrue(sim.Complete(true), "Simulation failed to complete the ring");
   SimpleTimer.RunSteps(fifteen_mins);
   Node node0 = sim.TakenIDs.Values[0].Node;
   int idx = 1;
   Node node1 = sim.TakenIDs.Values[idx].Node;
   while(Simulator.AreConnected(node0, node1) && idx < sim.TakenIDs.Count) {
     node1 = sim.TakenIDs.Values[++idx].Node;
   }
   var ptype = new PType("chtest");
   var ch0 = new ConnectionHandler(ptype, (StructuredNode) node0);
   var ch1 = new ConnectionHandler(ptype, (StructuredNode) node1);
   ConnectionHandlerTest(node0, node1, ch0, ch1);
 }
开发者ID:acisp2p,项目名称:brunet,代码行数:20,代码来源:SimulatorUnit.cs


示例19: ImageUpload

        public string ImageUpload(PType p, HttpPostedFileBase file)
        {

            new FileUpload().SaveFile(file);
            return "";

            if (file == null) return new { success = false, msg = "请选择图片" }.GetJson();
            string ext = file.FileName.Substring(file.FileName.LastIndexOf('.')+1, file.FileName.Length - file.FileName.LastIndexOf('.')-1);
            //BMP、JPG、JPEG、PNG、GIF
            string[] imageExt = { "BPM", "JPG", "JPEG", "PNG", "GIF","ICO" };
            if (!imageExt.Contains(ext.ToUpper())) return new { success = false, msg = "只能上传图片文件" }.GetJson();

            byte[] buffer = null;
            buffer = new byte[file.ContentLength];
            file.InputStream.Read(buffer, 0, file.ContentLength);

            string[] ret = new FileUpload().PictureSave(p, "", buffer);
            if(ret==null) return new {success=false,msg="图片上传失败"}.GetJson();
            return new { success = true,imageId=ret[0] }.GetJson();
        }
开发者ID:myname88,项目名称:myjobs,代码行数:20,代码来源:ImageFileController.cs


示例20: MethodDescription

        public MethodDescription(AMethodDecl method)
        {
            Parser parser = new Parser(method);

            Start = parser.Start;
            End = parser.End;
            ReturnType = parser.ReturnType;
            Name = parser.Name;
            Formals = parser.Formals;
            Locals = parser.Locals;
            if (method.Parent() != null)
                method.Parent().RemoveChild(method);
            IsDelegate = method.GetDelegate() != null;
            //if (!IsDelegate)
                Decl = method;
            IsStatic = method.GetStatic() != null;
            Visibility = method.GetVisibilityModifier();
            realType = (PType)method.GetReturnType().Clone();
            Position = TextPoint.FromCompilerCoords(method.GetName());
        }
开发者ID:Whimsyduke,项目名称:GalaxyEditorPlusPlus,代码行数:20,代码来源:MethodDescription.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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