public static void SetIterationContext(WindowsRuntimeDesignerContext context) { if (!AppDomain.CurrentDomain.IsDefaultAppDomain()) { throw new NotSupportedException(); } if (context == null) { throw new ArgumentNullException("context"); } lock (WindowsRuntimeDesignerContext.s_lock) WindowsRuntimeDesignerContext.SetCurrentContext(true, context.m_contextObject); }
public static void InitializeSharedContext(IEnumerable <string> paths) { if (!AppDomain.CurrentDomain.IsDefaultAppDomain()) { throw new NotSupportedException(); } if (paths == null) { throw new ArgumentNullException("paths"); } lock (WindowsRuntimeDesignerContext.s_lock) { if (WindowsRuntimeDesignerContext.s_sharedContext != IntPtr.Zero) { throw new NotSupportedException(); } IntPtr local_2 = WindowsRuntimeDesignerContext.CreateDesignerContext(paths, true); WindowsRuntimeDesignerContext.SetCurrentContext(false, local_2); WindowsRuntimeDesignerContext.s_sharedContext = local_2; } }