public void AddActivation <TParent>(RootNode root, AlphaNode <TParent> activation) { AlphaNode <T> alphaNode = root.GetAlphaNode <T>(); var adapter = (Activation <TParent>) FastActivator.Create(typeof(ConvertNode <,>), new[] { typeof(TParent), typeof(T) }, new object[] { alphaNode }); activation.AddActivation(adapter); }
Activation CreateMissingAlphaNode <T>(Type type) { var alphaNode = new AlphaNode <T>(); foreach (Type nestedType in GetNestedMessageTypes(typeof(T))) { _initializers[nestedType].AddActivation(this, alphaNode); } return(alphaNode); }