Castle Windsor: How to register by convention with delegate method?
温莎城堡:如何通过委托方法公约登记?
Notice that it always sends itself as the first argument to the delegate method.
注意:它总是把自己作为第一个参数传递给它的委托方法。
The invocation handler class will also delegate method calls to a real implementation class in order to process the core business logic.
调用处理程序类还会把方法调用委托到真正的实现类,以便处理核心业务逻辑。
An interface reference or a delegate can be used by an object that has no knowledge of the class that implements the interface or delegate method.
即使不知道实作介面或委派方法的类别,物件仍然可以使用介面参考或委派。
These all accept a delegate, usually in the form of an anonymous method.
这些操作都可以接受一个委托,一般可以使用匿名方法的方式来传递。
Use the .Compile() method to turn the expression tree into a delegate so that you can execute it.
用.Compile()方法去将一个表达式树转换为一个委托,然后你可以执行它。
The ExecuteFromPool method accepts a delegate and arguments in addition to the desired type.
ExecuteFromPool方法除了接受所需类型以外,还接受委托和参数。
You can see the tableView delegate and data source set below in the viewDidLoad method.
可以看到在viewDidLoad方法中设置了tableView委托和数据源。
A new method called ForAll allows each thread to call a delegate directly against each item.
一个新的ForAll方法允许每个线程直接对于每个元素执行某个委托调用。
The execute method invokes the given delegate with an object from the pool, and ensures that the retrieved object is returned to the pool after the delegate completes.
Execute方法用该池中的对象调用给定的委托,并且确保在该委托完成之后将检索到的对象返回到该池中。
Our handle method will delegate most of the processing to other methods, and change the existing handle method to match that of Listing 2.
我们的handle方法会将大部分处理委托给其他方法,请更改现有的handlemethod以与清单2中的方法匹配。
These are classes that execute user code, often a delegate to some method (which might be anonymous), when certain conditions are met.
这些类用来在当特定情况出现时执行用户代码(用户代码通常是某个方法的delegate)。
For instance, when your application is shutting down, the WillTerminate method is called on your application delegate, and you have an opportunity to save any user data, application state, etc.
比如,在应用程序关闭的时候,WillTerminate方法将被调用,这样就有机会去保存任何用户数据、应用程序状态等。
However, instead of specifying a callback method, specify a delegate for the connection, once you have set this to self.
但是,一旦您将代理设置为self,就应该为连接指定一个代理,而不是一个回调方法。
The updateCD() method delegates most of its responsibility to the business delegate.
updateCD()方法可以代理业务代理的大部分职责。
The CPURLConnection's delegate class defines the name of the method to be invoked.
CPURLConnection的代理类定义将被调用的方法的名的类。
For example, the proxy class could delegate the method invocation to any other object or even handle it itself.
例如,代理类可以把方法调用委托其他任何对象,甚至是处理程序本身。
It will first validate method parameters upon a method invocation and then delegate the method call to the implementation class.
它首先验证方法调用的方法参数,然后把方法调用委托给实现类。
You can also delegate the behavior to a public method on the aspect if you choose.
如果愿意的话,还可以将行为委派给方面的公共方法。
Here, manager is the delegate and his subordinate is the method wrapped up with the delegate.
在这里,经理是委托,他的下属就是跟这个委托联系在一起的方法。
Delegate is a reference pointer to a method. It allows us to treat method as a variable and pass method as a variable for a callback.
委托是一个方法的引用指针。它允许我们将方法作为一个变量并传递方法作为回调函数的一个变量。
Use empty parentheses on parameter-less anonymous methods. Omit the parentheses only if the anonymous method could have been used on any delegate.
没有参数的匿名方法加上空的圆括号。除非这个匿名方法可能被用到任何类型的委托上。
As shown in Listing 1, you delegate the serialization to PurchaseOrder's marshal method.
如清单1所示,您将可以将序列化委托给PurchaseOrder的marshal方法。
It would be possible to handle methods directly in this handler class, but it's much cleaner to delegate different method types (getters and setters, for example) to different implementation classes.
虽然也可以在这个处理程序类中直接处理方法,但是更简洁的做法是将不同的方法类型(例如getter和setter)委托给不同的实现类。
They each delegate the real work to the run method of a PrivilegedExceptionAction class that is invoked within a privileged block.
它们各自将实际工作委托给privilegedexceptionaction类的run方法,这个类在特许块中被调用。
The remaining parts of the delegate specify the kind of method that instances of this delegate can represent.
该委托的其余部分指明了这个委托的实例可以代表的方法的种类。
The main method then proceeds to delegate the parsing of the argument to a CmdLineParser object, which then returns an Options object.
main方法然后会将参数解析委托给CmdLineParser对象,后者将返回Options对象。
A delegate is an object that contains a reference to a method.
委托是包含有对一个方法的引用的对象。
With anonymous methods mimic the code layout of a regular method, aligned with the anonymous delegate declaration.
匿名方法模仿普通方法的布局,和匿名委托定义放在一行。
Sorry, I'd like to give you a reference to that method, and that's what a delegate is.
但是除此之外,我还会给你一个方法的引用,那么这就是委托。
应用推荐