~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Xaml/XamlLoadSettings.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using System.Collections.Generic;
 
6
using System.Reflection;
 
7
using ICSharpCode.WpfDesign.Designer.Services;
 
8
using ICSharpCode.WpfDesign.XamlDom;
 
9
 
 
10
namespace ICSharpCode.WpfDesign.Designer.Xaml
 
11
{
 
12
        /// <summary>
 
13
        /// Settings used to load a XAML document.
 
14
        /// </summary>
 
15
        public sealed class XamlLoadSettings
 
16
        {
 
17
                public readonly ICollection<Assembly> DesignerAssemblies = new List<Assembly>();
 
18
                public readonly List<Action<XamlDesignContext>> CustomServiceRegisterFunctions = new List<Action<XamlDesignContext>>();
 
19
                public Action<XamlErrorService> ReportErrors;
 
20
                XamlTypeFinder typeFinder = XamlTypeFinder.CreateWpfTypeFinder();
 
21
                
 
22
                public XamlTypeFinder TypeFinder {
 
23
                        get { return typeFinder; }
 
24
                        set {
 
25
                                if (value == null)
 
26
                                        throw new ArgumentNullException("value");
 
27
                                typeFinder = value;
 
28
                        }
 
29
                }
 
30
                
 
31
                public XamlLoadSettings()
 
32
                {
 
33
                        DesignerAssemblies.Add(typeof(XamlDesignContext).Assembly);
 
34
                }
 
35
        }
 
36
}