本文整理汇总了C#中EA.GetMethodByGuid方法的典型用法代码示例。如果您正苦于以下问题:C# EA.GetMethodByGuid方法的具体用法?C# EA.GetMethodByGuid怎么用?C# EA.GetMethodByGuid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EA
的用法示例。
在下文中一共展示了EA.GetMethodByGuid方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: showObjectProperties
public void showObjectProperties(EA.Repository Repository, string GUID, EA.ObjectType ot)
{
eaObjectType.Text = ot.ToString();
eaObjectName.Text = "?";
switch(ot)
{
case EA.ObjectType.otAttribute:
EA.Attribute attribute = Repository.GetAttributeByGuid(GUID);
currentEaObject = attribute;
currentEaObjectCollections = null;
eaObjectName.Text = attribute.Name;
showEmbeddedObjects.Enabled = false;
showEmbeddedObjects.Checked = false;
break;
case EA.ObjectType.otElement:
EA.Element element = Repository.GetElementByGuid(GUID);
currentEaObject = element;
currentEaObjectCollections = new EAElementCollections(element);
eaObjectName.Text = element.Name;
showEmbeddedObjects.Enabled = true;
break;
case EA.ObjectType.otMethod:
EA.Method method = Repository.GetMethodByGuid(GUID);
currentEaObject = method;
currentEaObjectCollections = null;
eaObjectName.Text = method.Name;
showEmbeddedObjects.Enabled = false;
showEmbeddedObjects.Checked = false;
break;
case EA.ObjectType.otPackage:
EA.Package package = Repository.GetPackageByGuid(GUID);
currentEaObject = package;
currentEaObjectCollections = new EAPackageCollections(package);
eaObjectName.Text = package.Name;
showEmbeddedObjects.Enabled = true;
break;
case EA.ObjectType.otConnector:
EA.Connector connector = Repository.GetConnectorByGuid(GUID);
currentEaObject = connector;
currentEaObjectCollections = null;
showEmbeddedObjects.Enabled = false;
showEmbeddedObjects.Checked = false;
break;
default:
currentEaObject = null;
currentEaObjectCollections = null;
propertyGrid.SelectedObject = null;
showEmbeddedObjects.Enabled = false;
showEmbeddedObjects.Checked = false;
break;
}
SynchPropertyGridSelection();
}
示例2: save
public override void save(EA.Repository rep, FindAndReplaceItem.FieldType fieldType)
{
EA.Method meth = rep.GetMethodByGuid(GUID);
if ((fieldType & FindAndReplaceItem.FieldType.Description) > 0)
{ meth.Notes = _Description; }
if ((fieldType & FindAndReplaceItem.FieldType.Name) > 0)
{ meth.Name = _Name; }
if ((fieldType & FindAndReplaceItem.FieldType.Stereotype) > 0)
{ meth.StereotypeEx = _Stereotype; }
_isUpdated = true;
meth.Update();
}
示例3: RunMethodRule
public void RunMethodRule(EA.Repository Repository, string sRuleID, string MethodGUID, long ObjectID)
{
EA.Method method = Repository.GetMethodByGuid(MethodGUID);
if (method != null)
{
switch (LookupMapEx(sRuleID))
{
case rule76:
DoRule76(Repository, method);
break;
case rule77:
DoRule77(Repository, method);
break;
case rule78:
DoRule78(Repository, method);
break;
case rule79:
DoRule79_to_83(Repository, method, "Create");
break;
case rule80:
DoRule79_to_83(Repository, method, "Read");
break;
case rule81:
DoRule79_to_83(Repository, method, "Update");
break;
case rule82:
DoRule79_to_83(Repository, method, "Delete");
break;
case rule83:
DoRule79_to_83(Repository, method, "DeleteAll");
break;
case rule84:
DoRule84(Repository, method);
break;
case rule85:
DoRule85(Repository, method);
break;
case rule86:
DoRule86(Repository, method);
break;
case rule87:
DoRule87(Repository, method);
break;
default:
break;
}
}
}
示例4: GetMethodFromMethodName
public static EA.Method GetMethodFromMethodName(EA.Repository rep, string methodName)
{
EA.Method method = null;
string query = @"select op.ea_guid AS EA_GUID
from t_operation op
where op.name = '" + methodName + "' ";
string str = rep.SQLQuery(query);
var xmlDoc = new XmlDocument();
xmlDoc.LoadXml(str);
XmlNode operationGuidNode = xmlDoc.SelectSingleNode("//EA_GUID");
if (operationGuidNode != null)
{
string guid = operationGuidNode.InnerText;
method = rep.GetMethodByGuid(guid);
}
return method;
}
示例5: FindAndReplaceItemMethod
public FindAndReplaceItemMethod(EA.Repository rep, string GUID) :base(rep, GUID)
{
this._meth = rep.GetMethodByGuid(GUID);
this.load(rep);
}
示例6: GetOperationFromConnector
//.........这里部分代码省略.........
// (!rep.ConnectionString.Contains(".eap")))// Access
// {
// query =
// @"select op.ea_guid AS EA_GUID
// from t_operation op
// where op.Behaviour = '" + el.ElementGUID + "'";
// }
// string str = rep.SQLQuery(query);
// XmlDocument XmlDoc = new XmlDocument();
// XmlDoc.LoadXml(str);
// XmlNode operationGUIDNode = XmlDoc.SelectSingleNode("//EA_GUID");
// if (operationGUIDNode != null)
// {
// string GUID = operationGUIDNode.InnerText;
// method = rep.GetMethodByGuid(GUID);
// }
// return method;
// }
public static Method GetOperationFromConnector(EA.Repository rep, EA.Connector con)
{
Method method = null;
string query = "";
if (GetConnectionString(rep).Contains("DBType=3"))
//pdat3: 'Activity','Sequence', (..)
{ // Oracle DB
query =
@"select description AS EA_GUID
from t_xref x
where Cast(x.client As Varchar2(38)) = '" + con.ConnectorGUID + "'" +
" AND Behavior = 'effect' ";
}
if (GetConnectionString(rep).Contains("DBType=1"))
{ // SQL Server
query =
@"select description AS EA_GUID
from t_xref x
where Substring(x.client,1,38) = " + "'" + con.ConnectorGUID + "'" +
" AND Behavior = 'effect' "
;
}
if (GetConnectionString(rep).Contains(".eap"))
{
query =
@"select description AS EA_GUID
from t_xref x
where client = " + "'" + con.ConnectorGUID + "'" +
" AND Behavior = 'effect' "
;
}
if ((! GetConnectionString(rep).Contains("DBType=1")) && // SQL Server, DBType=0 MySQL
(! GetConnectionString(rep).Contains("DBType=3")) && // Oracle
(! GetConnectionString(rep).Contains(".eap")))// Access
{
query =
@"select description AS EA_GUID
from t_xref x
where client = " + "'" + con.ConnectorGUID + "'" +
" AND Behavior = 'effect' "
;
}
string str = rep.SQLQuery(query);
var xmlDoc = new XmlDocument();
xmlDoc.LoadXml(str);
//string type = "";
//XmlNode pdat3Node = XmlDoc.SelectSingleNode("//PDAT3");
//if (pdat3Node != null)
//{
// type = pdat3Node.InnerText;
//}
//if ( type.EndsWith(")")) // Operation
//{
string guid = null;
XmlNode operationGuidNode = xmlDoc.SelectSingleNode("//EA_GUID");
if (operationGuidNode != null)
{
guid = operationGuidNode.InnerText;
method = rep.GetMethodByGuid(guid);
}
if (method == null)
{
if (guid != null) OpenBehaviorForElement(rep, rep.GetElementByGuid(guid));
}
//}
return method;
}
示例7: GetOperationFromBrehavior
// Find the operation from Activity / State Machine
// it excludes operations in state machines
public static Method GetOperationFromBrehavior(EA.Repository rep, EA.Element el)
{
Method method = null;
string query = "";
string conString = GetConnectionString(rep); // due to shortcuts
if (conString.Contains("DBType=3"))
{ // Oracle DB
query =
@"select op.ea_guid AS EA_GUID
from t_operation op
where Cast(op.Behaviour As Varchar2(38)) = '" + el.ElementGUID + "' "+
" AND (Type is Null or Type not in ('do','entry','exit'))";
}
if (conString.Contains("DBType=1"))
// SQL Server
{ query =
@"select op.ea_guid AS EA_GUID
from t_operation op
where Substring(op.Behaviour,1,38) = '" + el.ElementGUID + "'" +
" AND (Type is Null or Type not in ('do','entry','exit'))";
}
if (conString.Contains(".eap"))
// SQL Server
{ query =
@"select op.ea_guid AS EA_GUID
from t_operation op
where op.Behaviour = '" + el.ElementGUID + "'" +
" AND ( Type is Null or Type not in ('do','entry','exit'))";
}
if ((! conString.Contains("DBType=1")) && // SQL Server, DBType=0 MySQL
(! conString.Contains("DBType=3")) && // Oracle
(! conString.Contains(".eap")))// Access
{
query =
@"select op.ea_guid AS EA_GUID
from t_operation op
where op.Behaviour = '" + el.ElementGUID + "'" +
" AND (Type is Null or Type not in ('do','entry','exit'))";
}
string str = rep.SQLQuery(query);
var xmlDoc = new XmlDocument();
xmlDoc.LoadXml(str);
XmlNode operationGuidNode = xmlDoc.SelectSingleNode("//EA_GUID");
if (operationGuidNode != null)
{
string guid = operationGuidNode.InnerText;
method = rep.GetMethodByGuid(guid);
}
return method;
}
示例8: GetOperationFromCallAction
// Find the calling operation from a Call Operation Action
public static Method GetOperationFromCallAction(EA.Repository rep, EA.Element obj)
{
string wildCard = GetWildCard(rep);
string query = @"SELECT op.ea_guid AS OPERATION from (t_object o inner join t_operation op on (o.classifier_guid = op.ea_guid))
inner join t_xref x on (x.client = o.ea_guid)
where x.name = 'CustomProperties' and
x.description like '"+ wildCard + "CallOperation" + wildCard +
"' and o.object_id = " + obj.ElementID;
string str = rep.SQLQuery(query);
var xmlDoc = new XmlDocument();
xmlDoc.LoadXml(str);
XmlNode operationGuidNode = xmlDoc.SelectSingleNode("//OPERATION");
if (operationGuidNode != null)
{
var guid = operationGuidNode.InnerText;
return rep.GetMethodByGuid(guid);
}
return null;
}
示例9: GetOperationFromAction
// Find the calling operation from a Call Operation Action
public static Method GetOperationFromAction(EA.Repository rep, EA.Element action)
{
Method method = null;
string query = @"select o.Classifier_guid AS CLASSIFIER_GUID
from t_object o
where o.Object_ID = " + action.ElementID;
string str = rep.SQLQuery(query);
var xmlDoc = new XmlDocument();
xmlDoc.LoadXml(str);
XmlNode operationGuidNode = xmlDoc.SelectSingleNode("//CLASSIFIER_GUID");
if (operationGuidNode != null)
{
string guid = operationGuidNode.InnerText;
method = rep.GetMethodByGuid(guid);
}
return method;
}