Welcome to mirror list, hosted at ThFree Co, Russian Federation.

DesignTimeParseData.cs « System.Web.UI « System.Web « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 76afe2883c2a911493975a9f37387592396bb716 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//
// System.Web.UI.DesignTimeParseData.cs
//
// Authors:
//   Gaurav Vaish (gvaish@iitk.ac.in)
//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
//
// (C) 2001 Gaurav Vaish
// (C) 2003 Andreas Nahr
//

using System;
using System.Web;
using System.ComponentModel.Design;

namespace System.Web.UI
{
	public sealed class DesignTimeParseData
	{
		private static bool inDesigner = false;
		private EventHandler dataBindingHandler;
		private IDesignerHost designerHost;
		private string documentUrl;
		private string parseText;

		public DesignTimeParseData(IDesignerHost designerHost, string parseText)
		{
			if (parseText == null)
				throw new ArgumentNullException("parseText");
			if (parseText.Length == 0)
				throw new ArgumentException("parseText cannot be an empty string.", "parseText");

			DesignTimeParseData.inDesigner = true;
			this.designerHost = designerHost;
			this.parseText = parseText;
			this.documentUrl = string.Empty;
		} 

		public EventHandler DataBindingHandler {
			get {return dataBindingHandler;} 
			set {dataBindingHandler = value;}
		}

		public IDesignerHost DesignerHost {
			get {return designerHost;}
		}

		public string DocumentUrl {
			get {return documentUrl;}
			set {
				if (value == null)
					documentUrl = string.Empty;
				else
					documentUrl = value;
			}
		}

		public string ParseText {
			get {return parseText;}
		}

		internal static bool InDesigner {
			get {return inDesigner;}
		}
	}
}