Пример #1
0
		/// <summary>
		/// 	creates new with all defaults
		/// </summary>
		/// <remarks>
		/// </remarks>
		public ThemaCompilerContext() {
			SourceFileData = new Dictionary<string, string>();
			SourceFileXml = new Dictionary<string, XElement>();
			Themas = new Dictionary<string, ThemaDescriptor>();
			SubsetIndex = new Dictionary<string, XElement>();
			ParameterIndex = new Dictionary<string, XElement>();
			Properties = new Dictionary<string, object>();
			Errors = new List<ThemaCompilerError>();
			SourceFiles = new List<string>();
			Globals = new Dictionary<string, string>();
			LocalFileNames = new Dictionary<string, string>();
			Generators = new Dictionary<string, GeneratorDescriptor>();
			LinkTypes = new Dictionary<string, ThemaLinkType>();
			OrgNodeIndex = new OrgNodeCollection();
			RoleMaps = new BindingList<RoleMap>();
			EcoProcessIndex = new EcoProcessCollection();
		}
Пример #2
0
		/// <summary>
		/// 	Resolves the structure and org nodes.
		/// </summary>
		/// <param name="orgnodes"> The orgnodes. </param>
		/// <param name="themas"> The themas. </param>
		/// <remarks>
		/// </remarks>
		public void ResolveStructureAndOrgNodes(OrgNodeCollection orgnodes, ThemaDescriptor[] themas) {
			BindProcessIns();
			if (null != orgnodes) {
				BindOrgNodes(orgnodes);
			}
			if (null != themas) {
				BindThemas(themas);
			}
		}
Пример #3
0
		/// <summary>
		/// 	Binds the org nodes.
		/// </summary>
		/// <param name="orgnodes"> The orgnodes. </param>
		/// <remarks>
		/// </remarks>
		private void BindOrgNodes(OrgNodeCollection orgnodes) {
			foreach (var process in Index.Values) {
				var orgnode = orgnodes[process.OrgNodeCode];
				if (null == orgnode) {
					Errors.Add(
						new EcoProcessException("Процесс " + process.Code + " ссылается на несуществующий исполнительный узел " +
						                        process.OrgNodeCode, process.Xml));
					continue;
				}
				process.OrgNode = orgnode;
				orgnode.Processes.Add(process);
			}
		}