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


C# this.Accept方法代码示例

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


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

示例1: Accept

 internal static void Accept(this ControlPropertyBag propertyBag, ControlPropertyFiller[] fillers)
 {
     foreach (var filler in fillers)
     {
         propertyBag.Accept(filler);
     }
 }
开发者ID:krishnarajv,项目名称:Code,代码行数:7,代码来源:ControlPropertyBagExtension.cs

示例2: InterceptMethodCalls

 /// <summary>
 /// Modifies the current <paramref name="target"/> to support third-party method call interception for all method calls made inside the target.
 /// </summary>
 /// <param name="target">The target object.</param>
 /// <param name="methodCallFilter">The <see cref="IMethodCallFilter"/> instance that determines the method calls that will be intercepted.</param>
 /// <param name="hostMethodFilter">The <see cref="IMethodFilter"/> instance that determines the host method calls that will be modified</param>
 public static void InterceptMethodCalls(this IReflectionVisitable target, IMethodCallFilter methodCallFilter,
     IMethodFilter hostMethodFilter)
 {
     var rewriter = new InterceptMethodCalls(methodCallFilter);
     target.Accept(new ImplementModifiableType(GetDefaultTypeFilter()));
     target.WeaveWith(rewriter, hostMethodFilter.ShouldWeave);
 }
开发者ID:slieser,项目名称:LinFu,代码行数:13,代码来源:MethodCallInterceptionExtensions.cs

示例3: FindProjects

	/// <summary>
	/// Finds all projects in the solution matching the given predicate.
	/// </summary>
	/// <param name="solution">The solution to traverse.</param>
	/// <param name="predicate">Predicate used to match projects.</param>
	/// <returns>All project nodes matching the given predicate that were found.</returns>
	public static IEnumerable<IProjectNode> FindProjects (this ISolutionNode solution, Func<IProjectNode, bool> predicate)
	{
		var visitor = new FilteringProjectsVisitor(predicate);

		solution.Accept (visitor);

		return visitor.Projects;
	}
开发者ID:kzu,项目名称:clide,代码行数:14,代码来源:ISolutionNodeExtensions.cs

示例4: FindProject

	/// <summary>
	/// Finds the first project in the solution matching the given predicate.
	/// </summary>
	/// <param name="solution">The solution to traverse.</param>
	/// <param name="predicate">Predicate used to match projects.</param>
	/// <returns>The first project matching the given predicate, or <see langword="null"/>.</returns>
	public static IProjectNode FindProject (this ISolutionNode solution, Func<IProjectNode, bool> predicate)
	{
		var visitor = new FilteringProjectsVisitor(predicate, true);

		solution.Accept (visitor);

		return visitor.Projects.FirstOrDefault ();
	}
开发者ID:kzu,项目名称:clide,代码行数:14,代码来源:ISolutionNodeExtensions.cs

示例5: GetGraph

        public static RulesEngineGraph GetGraph(this OdoyuleRulesEngine rulesEngine)
        {
            var inspector = new GraphRulesEngineVisitor();

            rulesEngine.Accept(inspector);

            return inspector.Graph;
        }
开发者ID:GaryLCoxJr,项目名称:OdoyuleRules,代码行数:8,代码来源:GraphRulesEngineExtensions.cs

示例6: InterceptMethodBody

        public static void InterceptMethodBody(this IReflectionStructureVisitable target,
                                               Func<MethodReference, bool> methodFilter, Func<TypeReference, bool> typeFilter)
        {
            target.Accept(new ImplementModifiableType(typeFilter));

            var interceptMethodBody = new InterceptMethodBody(methodFilter);
            target.WeaveWith(interceptMethodBody, methodFilter);
        }
开发者ID:svgorbunov,项目名称:ScrollsModLoader,代码行数:8,代码来源:MethodBodyInterceptionExtensions.cs

示例7: ShowVisualizer

        public static void ShowVisualizer(this RulesEngine engine)
        {
            var visitor = new GraphRulesEngineVisitor();
            engine.Accept(visitor);

            RulesEngineGraph graph = visitor.Graph;

            RulesEngineDebugVisualizer.Show(graph);
        }
开发者ID:GaryLCoxJr,项目名称:OdoyuleRules,代码行数:9,代码来源:RulesEngineVisualizerExtensions.cs

示例8: GetTcpListener

        /// <summary>
        /// Return a concrete implementation of a TCP listener
        /// </summary>
        /// <param name="port"></param>
        /// <param name="protocol"></param>
        /// <returns></returns>
        public static ICommServer GetTcpListener(
            this Socket port,
            IProtocol protocol)
        {
            var client = port.Accept();
            Debug.Print("open");

            return new TcpServer(
                client,
                protocol);
        }
开发者ID:gbcwbz,项目名称:ModbusTool,代码行数:17,代码来源:SocketExtensions.cs

示例9: ToListenerObservable

        public static IObservable<Socket> ToListenerObservable(this Socket socket, int backlog, Selector selector)
        {
            return Observable.Create<Socket>(observer =>
            {
                socket.Listen(backlog);

                selector.AddCallback(SelectMode.SelectRead, socket, _ =>
                {
                    var accepted = socket.Accept();
                    accepted.Blocking = false;
                    observer.OnNext(accepted);
                });

                return Disposable.Create(() => selector.RemoveCallback(SelectMode.SelectRead, socket));
            });
        }
开发者ID:tleviathan,项目名称:JetBlack.Network,代码行数:16,代码来源:ListenerExtensions.cs

示例10: GenerateExpressionSyntax

 public static ExpressionSyntax GenerateExpressionSyntax(
     this ITypeSymbol typeSymbol)
 {
     return typeSymbol.Accept(ExpressionSyntaxGeneratorVisitor.Instance).WithAdditionalAnnotations(Simplifier.Annotation);
 }
开发者ID:Rickinio,项目名称:roslyn,代码行数:5,代码来源:ITypeSymbolExtensions.cs

示例11: AsiToString

 public static String AsiToString(this IAsi asi)
     => asi.Accept(Program.DefaultPrinter).Trim('"');
开发者ID:michal-minich,项目名称:Efekt-CS,代码行数:2,代码来源:Builtins.cs

示例12: GetInnermostAtomicStatement

 /// <summary>
 /// Extracts the first innermost atomic statement inside a given statement.
 /// </summary>
 /// <param name="stmt"></param>
 /// <returns></returns>
 public static Statement GetInnermostAtomicStatement(this Statement stmt)
 {
     InnermostAtomicStatementExtractor ase = new InnermostAtomicStatementExtractor();
     stmt.Accept(ase);
     return ase.Result;
 }
开发者ID:venusdharan,项目名称:systemsharp,代码行数:11,代码来源:ProgramflowSuccessors.cs

示例13: Accept

 /// <summary>
 /// Allows a <see cref="ITypeWeaver"/> instance to traverse any <see cref="IReflectionStructureVisitable"/>
 /// instance.
 /// </summary>
 /// <param name="visitable">The visitable object.</param>
 /// <param name="typeWeaver">The type weaver.</param>
 public static void Accept(this IReflectionStructureVisitable visitable, ITypeWeaver typeWeaver)
 {
     var visitor = new TypeWeaverVisitor(typeWeaver);
     visitable.Accept(visitor);
 }
开发者ID:leehavin,项目名称:linfu,代码行数:11,代码来源:CecilVisitorExtensions.cs

示例14: ToLogString

 public static string ToLogString(this QueryNode node)
 {
     return node.Accept(new QueryNodeToStringVisitor());
 }
开发者ID:nickgoodrow,项目名称:ODataSamples,代码行数:4,代码来源:ExtensionMethods.cs

示例15: Modifies

 /// <summary>
 /// Returns <c>true</c> if the given statement modifies the given variable.
 /// </summary>
 /// <remarks>
 /// The current implementation is not capable of detecting modifications of variables which are referenced as "out" arguments of some method.
 /// </remarks>
 /// <param name="stmt">statement</param>
 /// <param name="variable">variable</param>
 public static bool Modifies(this Statement stmt, IStorable variable)
 {
     VariableModificationDetector vmd = new VariableModificationDetector(variable);
     stmt.Accept(vmd);
     return vmd.Result;
 }
开发者ID:venusdharan,项目名称:systemsharp,代码行数:14,代码来源:VariableModificationDetection.cs


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