Beispiel #1
0
        public SharePointListQueryVisualizerForm(string entity, string caml, string linq, ParseErrorCollection errors)
        {
            _entity = entity;
            _caml   = caml;
            _linq   = linq;
            _errors = errors;

            InitializeComponent();
            linqTip.InitialDelay = 0;
            camlTip.InitialDelay = 0;

            Init();
        }
        /// <summary>
        /// Displays the debugger visualizer.
        /// </summary>
        /// <param name="windowService">Window service for use in the debugger visualizer.</param>
        /// <param name="objectProvider">Object provider to gain access to the object to be visualized.</param>
        protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            object data = objectProvider.GetObject();

            string caml   = (string)data.GetType().GetField("_camlForDebuggerVisualizer", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(data);
            string entity = (string)data.GetType().GetField("_entityForDebuggerVisualizer", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(data);
            string linq   = (string)data.GetType().GetField("_linqForDebuggerVisualizer", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(data);
            ParseErrorCollection errors = (ParseErrorCollection)data.GetType().GetField("_errorsForDebuggerVisualizer", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(data);

            using (SharePointListQueryVisualizerForm visualizer = new SharePointListQueryVisualizerForm(entity, caml, linq, errors))
            {
                windowService.ShowDialog(visualizer);
            }
        }