IMessage IMessageSink.SyncProcessMessage(IMessage msg) { var methodCallMessage = msg as IMethodCallMessage; if (methodCallMessage == null) { NotImplementedMethod(msg.ToString()); return(null); } Tracer.Assert(!methodCallMessage.HasVarArgs, "var-arguments are not supported."); Tracer.Assert ( methodCallMessage.InArgCount == methodCallMessage.ArgCount, "Only in-arguments are supported" ); var methodInfo = (MethodInfo)methodCallMessage.MethodBase; var result = SyncProcessMethod(methodInfo, methodCallMessage); return(new ReturnMessage(result, null, 0, null, methodCallMessage)); }
//========================================================================================== // Methods //========================================================================================== /// <summary> /// Creates a new <see cref="WixProject"/> object. /// </summary> /// <param name="serializer">The <see cref="ProjectSerializer"/> to use for saving the project.</param> /// <returns>A new <see cref="Project"/> object.</returns> protected override Project CreateProject(ProjectSerializer serializer) { Tracer.Assert(serializer is WixProjectSerializer, "Somehow we're not getting the right type of serializer here."); return(new WixProject((WixProjectSerializer)serializer)); }
/// <summary> /// Creates a new <see cref="WixProjectConfiguration"/> object. /// </summary> /// <param name="project">The parent <see cref="Project"/> of the configuration.</param> /// <param name="name">The name of the configuration.</param> /// <returns>A newly created <see cref="ProjectConfiguration"/> object.</returns> protected override ProjectConfiguration CreateProjectConfiguration(Project project, string name) { Tracer.Assert(project is WixProject, "Somehow we're not getting the right type of project here."); return(new WixProjectConfiguration((WixProject)project, name)); }
public static TResult AssertNotNull <TResult>(this TResult target) where TResult : class { Tracer.Assert(target != null); return(target); }
public static TResult AssertValue <TResult>(this TResult?target) where TResult : struct { Tracer.Assert(target != null); return(target.Value); }