当前位置: 首页>>代码示例>>C#>>正文


C# Composite.GetType方法代码示例

本文整理汇总了C#中Composite.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# Composite.GetType方法的具体用法?C# Composite.GetType怎么用?C# Composite.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Composite的用法示例。


在下文中一共展示了Composite.GetType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AnalyzeComposite

 public void AnalyzeComposite(Composite comp, TreeNode parent)
 {
     var par = AddNode(comp.Guid.ToString(),
         string.IsNullOrEmpty(comp.DebugName)
             ? comp.GetType().Name
             : comp.DebugName + " | " + comp.GetType().Name,
         parent != null ? parent : root);
     if (comp is GroupComposite)
     {
         foreach (var children in (comp as GroupComposite).Children)
         {
             AnalyzeComposite(children, par);
         }
     }
 }
开发者ID:lances101,项目名称:BoringHeroes,代码行数:15,代码来源:TreeDebug.cs

示例2: GetMessage

 //[DebuggerStepThrough]
 ////[DebuggerHidden]
 private static string GetMessage(Composite composite, MethodInfo method, IEnumerable<ConstraintViolation> violations)
 {
     string message = string.Format("{0}.{1} caused parameter constraint violations", composite.GetType().Name, method.Name);
     foreach (ConstraintViolation violation in violations)
     {
         string violationMessage = string.Format("Parameter: '{0}' Value: '{1}' Constraint: '{2}'", violation.Name, violation.Value ?? "{null}", violation.Constraint.GetConstraintName());
         message += Environment.NewLine + violationMessage;
     }
     return message;
 }
开发者ID:attila3453,项目名称:alsing,代码行数:12,代码来源:ParameterConstraintViolationException.cs

示例3: StoreMethodName

        private static void StoreMethodName(Composite comp)
        {
            var cSharpCode = comp as ICSharpCode;
            if (cSharpCode != null)
            {
                CsharpCodeDict["Code" + Util.Rng.Next(int.MaxValue).ToString(CultureInfo.InvariantCulture)] = cSharpCode;
                cSharpCode.CompileError = "";
            }
            // check for DynamicExpression proprerties
            List<IDynamicProperty> dynProps = (from prop in comp.GetType().GetProperties()
                                               where typeof (IDynamicProperty).IsAssignableFrom(prop.PropertyType)
                                               select (IDynamicProperty) prop.GetValue(comp, null)).ToList();
            foreach (IDynamicProperty dynProp in dynProps)
            {
                CsharpCodeDict["Code" + Util.Rng.Next(int.MaxValue).ToString(CultureInfo.InvariantCulture)] = dynProp;
                dynProp.CompileError = "";
            }

            var groupComposite = comp as GroupComposite;
            if (groupComposite != null)
            {
                foreach (Composite child in groupComposite.Children)
                    StoreMethodName(child);
            }
        }
开发者ID:Asphodan,项目名称:Alphabuddy,代码行数:25,代码来源:DynamicCodeCompiler.cs

示例4: printComposite

 private void printComposite(Composite comp, int cnt)
 {
     string name;
     if (comp is IPBComposite)
         name = ((IPBComposite) comp).Title;
     else
         name = comp.GetType().ToString();
     var pbComposite = comp as IPBComposite;
     if (pbComposite != null)
         Logging.Write("{0}{1} IsDone:{2} LastStatus:{3}", new string(' ', cnt*4), name,
                       (pbComposite).IsDone, comp.LastStatus);
     var groupComposite = comp as GroupComposite;
     if (groupComposite != null)
     {
         foreach (Composite child in (groupComposite).Children)
         {
             printComposite(child, cnt + 1);
         }
     }
 }
开发者ID:Asphodan,项目名称:Alphabuddy,代码行数:20,代码来源:MainForm.cs

示例5: printComposite

 void printComposite(Composite comp, int cnt)
 {
     string name;
     if (comp is IPBComposite)
         name = ((IPBComposite)comp).Title;
     else
         name = comp.GetType().ToString();
     if (typeof(IPBComposite).IsAssignableFrom(comp.GetType()))
         Logging.Write("{0}{1} IsDone:{2} LastStatus:{3}", new string(' ', cnt * 4), ((IPBComposite)comp).Title, ((IPBComposite)comp).IsDone, comp.LastStatus);
     if (comp is GroupComposite)
     {
         foreach (Composite child in ((GroupComposite)comp).Children)
         {
             printComposite(child, cnt + 1);
         }
     }
 }
开发者ID:naacra,项目名称:wowhbbotcracked,代码行数:17,代码来源:MainForm.cs


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