Back to OIM Explorer

JobQueueInfo/VI.Tools.JobQueueInfo/DCBase.cs

Decompiler Source FileJobQueueInfo.DCBaseDecompiled Source

2 extracted method/event/call references in DCBase.

Source: F:\Claude\.tmp\oim-decompiled-full\0788_One_Identity_Manager_JobQueueInfo.dll\VI.Tools.JobQueueInfo\DCBase.cs

Source size: 6.842 characters

Interpretation

  • Decompiled source file. Use method/event registrations and call-site extraction to connect back to DialogMethod, QBMEvent, and API layers.

Relations

  • CallMethod: ResetFrozen at line 250
  • CallMethod: ResetOverlimit at line 268

Typed Edges

  • No typed edges extracted for this source.

References

  • No direct source references extracted.

Referenced By

  • No direct source references extracted.

C# source-derived context

Generated by pattern extraction from the decompiled C# source and decompile index. This is factual source evidence, not inferred behavior.

reads entity values references DB/Dialog objects Job/process related markers

Summary: classes DCBase, Ready2Exe; methods SelectJob, GetNodeState, IsAnySelectedJob, ProcessSelectedJobs, ConfigureToolTip, GetJobState; references ESet, JobChain, JobQueue; markers reads entity values, references DB/Dialog objects, Job/process related markers

Classes

DCBase Ready2Exe

DB/Dialog object references

OIM key/entity markers

UID_Job

API/entity calls

GetValue CreateSingle CreateSingle

Registrations / handlers

None extracted.

Complete Source

C#275 lines
1using System;2using System.Collections.Generic;3using System.Windows.Forms;4using VI.Base;5using VI.CommonDialogs;6using VI.Controls;7using VI.Controls.SyntaxEdit;8using VI.DB;9using VI.DB.Sync;10using VI.FormBase;1112namespace VI.Tools.JobQueueInfo;1314internal class DCBase : UserControl15{16	internal static class Ready2Exe17	{18		public const string Frozen = "FROZEN";1920		public const string OverLimit = "OVERLIMIT";21	}2223	[Flags]24	private enum JobStates25	{26		Frozen = 0,27		Ready2Exe = 128	}2930	private ToolTipInfo _tipInfo;3132	private readonly JobBaseDictionary _jobs = new JobBaseDictionary();3334	private readonly ColumnCollection _columns = new ColumnCollection();3536	protected JobBaseDictionary Jobs => _jobs;3738	protected ColumnCollection Columns => _columns;3940	protected ToolTipInfo TipNode41	{42		get43		{44			return _tipInfo;45		}46		set47		{48			if (_tipInfo == null || !((object)_tipInfo).Equals((object)value))49			{50				if (_tipInfo != null)51				{52					ConfigureToolTip(null);53				}54				_tipInfo = value;55				if (_tipInfo != null)56				{57					ConfigureToolTip(_tipInfo);58				}59			}60		}61	}6263	public bool SelectJob(string strUID_Job)64	{65		if (((Dictionary<string, JobBase>)Jobs).ContainsKey(strUID_Job))66		{67			clsMain.Instance.CurrentJob = Jobs[strUID_Job];68			return true;69		}70		return false;71	}7273	protected string GetNodeState(TreeListNode tlNode)74	{75		if (tlNode == null)76		{77			return "";78		}79		NodeData data = tlNode.GetData();80		if (data != null && data.Type == NodeType.Job)81		{82			return Jobs[data.Data1].GetValue<string>("Ready2Exe").ToUpperInvariant();83		}84		return "";85	}8687	protected bool IsAnySelectedJob(TreeListControl treeListControl, string jobState)88	{89		foreach (TreeListNode selectedNode in treeListControl.SelectedNodes)90		{91			if (string.Equals(GetJobState(selectedNode), jobState, (StringComparison)5))92			{93				return true;94			}95		}96		return false;97	}9899	protected void ProcessSelectedJobs(TreeListControl treeListControl, string jobState, Action<TreeListNode, object> jobAction, object oParam = null)100	{101		try102		{103			using (BusyDialog.Start(((Control)this).FindForm()))104			{105				BusyDialog.MainText = "Update JobState";106				BusyDialog.DetailText = "";107				TipNode = null;108				foreach (TreeListNode selectedNode in treeListControl.SelectedNodes)109				{110					if (string.Equals(GetJobState(selectedNode), jobState, (StringComparison)5))111					{112						jobAction.Invoke(selectedNode, oParam);113					}114				}115			}116		}117		catch (System.Exception exception)118		{119			ExceptionMgr.Instance.HandleException(exception, this);120		}121	}122123	protected virtual void ConfigureToolTip(ToolTipInfo tipInfo)124	{125	}126127	protected virtual string GetJobState(TreeListNode tlNode)128	{129		if (tlNode == null)130		{131			return "";132		}133		NodeData data = tlNode.GetData();134		if (data != null && data.Type == NodeType.Job)135		{136			return ((JobQueue)Jobs[data.Data1]).GetValue<string>("Ready2Exe").ToUpperInvariant();137		}138		return "";139	}140141	protected virtual void ShowErrorMessages(TreeListNode tlNode)142	{143		NodeData data = tlNode.GetData();144		if (data != null)145		{146			ShowErrorMessages(data);147		}148	}149150	protected virtual void ShowErrorMessages(NodeData nd)151	{152		ShowErrorMessages(nd, (IWin32Window)(object)this);153	}154155	public static void ShowErrorMessages(NodeData nd, IWin32Window parent = null)156	{157		//IL_0008: Unknown result type (might be due to invalid IL or missing references)158		if (nd == null)159		{160			throw new ArgumentNullException("nd");161		}162		string strError = nd.Job.GetValue("ErrorMessages").String;163		LanguageManager instance = LanguageManager.Instance;164		object obj = nd.Job.GetValue("JobChainName").String + "-" + nd.Job.GetValue("TaskName").String;165		string strHeader = instance.FormatString("DCBase_JobShowError", new System.ReadOnlySpan<object>(ref obj));166		ShowErrorMessages(strError, strHeader, parent);167	}168169	public static void ShowErrorMessages(string strError, string strHeader, IWin32Window parent = null)170	{171		//IL_0017: Unknown result type (might be due to invalid IL or missing references)172		ExpandEditForm expandEditForm = new ExpandEditForm(strError);173		try174		{175			((Control)expandEditForm).Text = strHeader;176			expandEditForm.ReadOnly = true;177			((Form)expandEditForm).ShowDialog(parent);178		}179		finally180		{181			((System.IDisposable)(object)expandEditForm)?.Dispose();182		}183	}184185	protected virtual void JobShowLog(TreeListNode tlNode)186	{187		NodeData data = tlNode.GetData();188		if (data != null)189		{190			JobShowLog(data);191		}192	}193194	protected virtual void JobShowLog(NodeData nd)195	{196		//IL_0008: Unknown result type (might be due to invalid IL or missing references)197		//IL_00e5: Unknown result type (might be due to invalid IL or missing references)198		if (nd == null)199		{200			throw new ArgumentNullException("nd");201		}202		if (nd.Type != NodeType.Job)203		{204			return;205		}206		string urlForQueue = clsMain.Instance.ServerInfos.GetUrlForQueue(nd.Job.GetValue<string>("Queue"));207		if (string.IsNullOrWhiteSpace(urlForQueue))208		{209			throw new ViException(951003, nd.Job.GetValue("Queue"));210		}211		frmJobLog frmJobLog2 = new frmJobLog(urlForQueue, nd.Job.GetValue("UID_Job"));212		try213		{214			((Control)frmJobLog2).Text = string.Concat(new string[5]215			{216				LanguageManager.Instance["frmJobLog_Text"],217				" - ",218				nd.Job.GetValue<string>("TaskName"),219				" - ",220				nd.Job.GetValue<string>("UID_Job")221			});222			((Form)frmJobLog2).ShowDialog((IWin32Window)(object)Application.OpenForms[0]);223		}224		finally225		{226			((System.IDisposable)frmJobLog2)?.Dispose();227		}228	}229230	protected virtual bool IsAllowed(IConnection con, string featureName)231	{232		return con?.Features.IsAllowed(featureName) ?? false;233	}234235	internal virtual void Activated()236	{237	}238239	protected virtual bool Job_ResetFrozen(NodeData nData)240	{241		if (nData == null)242		{243			return false;244		}245		if (nData.Type == NodeType.Job && nData.Job.IsState("FROZEN"))246		{247			ISingleDbObject singleDbObject = clsMain.Instance.ConnectData.Connection.CreateSingle("JobQueue");248			singleDbObject["UID_Job"].NewValue = nData.Data1;249			singleDbObject.Load();250			singleDbObject.Custom.CallMethod("ResetFrozen");251			singleDbObject.Save();252			return true;253		}254		return false;255	}256257	protected virtual bool Job_ResetOverlimit(NodeData nData)258	{259		if (nData == null)260		{261			return false;262		}263		if (nData.Type == NodeType.Job && nData.Job.IsState("OVERLIMIT"))264		{265			ISingleDbObject singleDbObject = clsMain.Instance.ConnectData.Connection.CreateSingle("JobQueue");266			singleDbObject["UID_Job"].NewValue = nData.Data1;267			singleDbObject.Load();268			singleDbObject.Custom.CallMethod("ResetOverlimit");269			singleDbObject.Save();270			return true;271		}272		return false;273	}274}275