示例#1
0
		public DataSerializer (DataContext ctx, string baseFile)
		{
			dataContext = ctx;
			serializationContext = ctx.CreateSerializationContext ();
			serializationContext.BaseFile = baseFile;
			serializationContext.Serializer = this;
		}
		internal void SetContext (DataContext ctx)
		{
			this.ctx = ctx;
			if (dataType == null) {
				if (propType == null) throw new InvalidOperationException ("Property type not specified");
				dataType = ctx.GetConfigurationDataType (propType);
			}
		}
示例#3
0
		static MSBuildProjectService ()
		{
			Services.ProjectService.DataContextChanged += delegate {
				dataContext = null;
			};

			PropertyService.PropertyChanged += HandlePropertyChanged;
			DefaultMSBuildVerbosity = PropertyService.Get ("MonoDevelop.Ide.MSBuildVerbosity", MSBuildVerbosity.Normal);
		}
		static MD1ProjectService ()
		{
			attributeProvider = new XmlMapAttributeProvider ();
			AddinManager.AddExtensionNodeHandler (MD1SerializationMapsExtensionPath, OnMapsChanged);
			
			Services.ProjectService.DataContextChanged += delegate {
				// Regenerate the data context
				dataContext = null;
			};
		}
		static MSBuildProjectService ()
		{
			Services.ProjectService.DataContextChanged += delegate {
				dataContext = null;
			};

			PropertyService.PropertyChanged += HandlePropertyChanged;
			DefaultMSBuildVerbosity = PropertyService.Get ("MonoDevelop.Ide.MSBuildVerbosity", MSBuildVerbosity.Normal);

			Runtime.ShuttingDown += delegate {
				ShutDown = true;
				CleanProjectBuilders ();
			};
		}
		static void OnMapsChanged (object s, ExtensionNodeEventArgs args)
		{
			if (args.Change == ExtensionChange.Add) {
				SerializationMapNode node = (SerializationMapNode) args.ExtensionNode;
				attributeProvider.AddMap (node.Addin, node.FileContent, node.FileId);
			}
			else {
				SerializationMapNode node = (SerializationMapNode) args.ExtensionNode;
				attributeProvider.RemoveMap (node.FileId);
			}
			
			// Regenerate the data context
			dataContext = null;
		}
		static MSBuildProjectService ()
		{
			Services.ProjectService.DataContextChanged += delegate {
				dataContext = null;
			};

			PropertyService.PropertyChanged += HandlePropertyChanged;
			DefaultMSBuildVerbosity = PropertyService.Get ("MonoDevelop.Ide.MSBuildVerbosity", MSBuildVerbosity.Normal);

			Runtime.ShuttingDown += (sender, e) => ShutDown = true;

			const string gppPath = "/MonoDevelop/ProjectModel/MSBuildGlobalPropertyProviders";
			globalPropertyProviders = AddinManager.GetExtensionObjects<IMSBuildGlobalPropertyProvider> (gppPath);
			foreach (var gpp in globalPropertyProviders) {
				gpp.GlobalPropertiesChanged += HandleGlobalPropertyProviderChanged;
			}
		}
		static MSBuildProjectService ()
		{
			Services.ProjectService.DataContextChanged += delegate {
				dataContext = null;
			};

			PropertyService.PropertyChanged += HandlePropertyChanged;
			DefaultMSBuildVerbosity = Runtime.Preferences.MSBuildVerbosity;

			Runtime.ShuttingDown += (sender, e) => ShutDown = true;

			AddinManager.ExtensionChanged += OnExtensionChanged;
			LoadExtensionData ();
		}
示例#9
0
		internal void InitializeDataContext (DataContext ctx)
		{
			foreach (DataTypeCodon dtc in AddinManager.GetExtensionNodes (SerializableClassesExtensionPath)) {
				ctx.IncludeType (dtc.Addin, dtc.TypeName, dtc.ItemName);
			}
			foreach (ItemPropertyCodon cls in AddinManager.GetExtensionNodes (ExtendedPropertiesExtensionPath)) {
				ctx.RegisterProperty (cls.Addin, cls.TypeName, cls.PropertyName, cls.PropertyTypeName, cls.External, cls.SkipEmpty);
			}
		}
		static MSBuildProjectService ()
		{
			Services.ProjectService.DataContextChanged += delegate {
				dataContext = null;
			};

			PropertyService.PropertyChanged += HandlePropertyChanged;
			DefaultMSBuildVerbosity = Runtime.Preferences.MSBuildVerbosity;

			Runtime.ShuttingDown += (sender, e) => ShutDown = true;

			AddinManager.ExtensionChanged += OnExtensionChanged;
			LoadExtensionData ();

			specialCharactersEscaped = new Dictionary<char, string> (specialCharacters.Length);
			specialCharactersUnescaped = new Dictionary<string, char> (specialCharacters.Length);
			for (int i = 0; i < specialCharacters.Length; ++i) {
				var escaped = ((int)specialCharacters [i]).ToString ("X");
				specialCharactersEscaped [specialCharacters [i]] = '%' + escaped;
				specialCharactersUnescaped [escaped] = specialCharacters [i];
			}
		}
		public XmlDataSerializer (DataContext ctx) : this (new DataSerializer (ctx))
		{	
		}
		static MSBuildProjectService ()
		{
			Services.ProjectService.DataContextChanged += delegate {
				dataContext = null;
			};
		}
示例#13
0
 internal void SetContext(DataContext ctx)
 {
     this.ctx = ctx;
     Initialize();
 }
示例#14
0
		public DataSerializer (DataContext ctx)
		{
			dataContext = ctx;
			serializationContext = ctx.CreateSerializationContext ();
			serializationContext.Serializer = this;
		}
		public BinaryDataSerializer (DataContext ctx) : this (new DataSerializer (ctx))
		{	
		}
示例#16
0
		internal void InitializeDataContext (DataContext ctx)
		{
			foreach (DataTypeCodon dtc in AddinManager.GetExtensionNodes (SerializableClassesExtensionPath)) {
				ctx.IncludeType (dtc.Addin, dtc.TypeName, dtc.ItemName);
			}
		}
示例#17
0
		internal void SetContext (DataContext ctx)
		{
			this.ctx = ctx;
			Initialize ();
		}