本文整理汇总了C#中IController.GetComponent方法的典型用法代码示例。如果您正苦于以下问题:C# IController.GetComponent方法的具体用法?C# IController.GetComponent怎么用?C# IController.GetComponent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IController
的用法示例。
在下文中一共展示了IController.GetComponent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Copy
//.........这里部分代码省略.........
if (!isRoot) // non root dynamic, use app code class and ref link type to find it later
{
String appCode = dynamic.Attributes[ConfigFileConstants.appCode].Value;
appCodeObjects.Add(linkTypeValue, appCode);
String refLinkType = dynamic.Attributes[ConfigFileConstants.refLinkType].Value;
refLinkTypes.Add(linkTypeValue, refLinkType);
}
}
XmlNode bridgeDynamic = link.SelectSingleNode("BridgeDynamic");
if (bridgeDynamic != null)
{
String linkTypeValue = link.Attributes[ConfigFileConstants.Type].Value;
String value = bridgeDynamic.Attributes[ConfigFileConstants.component].Value;
dynamicBridge.Add(linkTypeValue, value);
}
schemaReader = this.readingController.GetXSD(schemaFileName);
schema = XmlSchema.Read(schemaReader, null);
schemaReader.Close();
schemaSet = new XmlSchemaSet();
schemaSet.Add(schema);
schemaSet.Compile();
foreach (XmlSchema compiledSchema in schemaSet.Schemas())
{
foundRootAndLT = false;
foreach (XmlSchemaElement element in compiledSchema.Elements.Values)
{
foundRootAndLT |= FindRootAndLinkType(element);
}
if (!foundRootAndLT)
{
MessageBox.Show("Root and link type not found for schema: " + schemaFileName);
}
}
}
// Schemas processed, start copying!
if (!parameters.UpdateAfterCopy)
{
writingController.TurnViewUpdateOff();
}
readingController.EnableLoadingCache();
helper = new BulkHelper();
helper.BeginBulkOperations(writingController.Configuration);
XPathNavigator self = readingController.GetComponent(parameters.StartingRootID).CreateNavigator().SelectSingleNode("Components/Component");
copiedRootName = parameters.NewName;
// ensure no invalid filename characters
for (int i = 0; i < copiedRootName.Length; i++)
{
char c = copiedRootName[i];
for (int j = 0; j < Path.GetInvalidFileNameChars().Length; j++)
{
if (c == Path.GetInvalidFileNameChars()[j])
{
MessageBox.Show("Invalid character in new name: " + c);
newName = "-1";
return -1;
}
}
}
newName = copiedRootName;
String componentType = self.GetAttribute(XmlSchemaConstants.Display.Component.Type, String.Empty);
String description = self.GetAttribute(XmlSchemaConstants.Display.Component.Description, String.Empty);
if (!schemaRootToLinkType.ContainsKey(componentType))
{
schemaRootToLinkType.Add(componentType, new List<String>());
}
if (parameters.StartingLinkType != null && !schemaRootToLinkType[componentType].Contains(parameters.StartingLinkType))
{
schemaRootToLinkType[componentType].Add(parameters.StartingLinkType);
}
String copyID = helper.CreateRootComponent(componentType, copiedRootName, description);
CopyIDType(parameters.StartingRootID, copyID, componentType, null, null);
readingController.DisableLoadingCache();
int rootID = helper.EndBulkOperations(parameters.ClearWriteDB, parameters.ShowDialog, "Copying " + componentType, "Copying...");
if (!parameters.UpdateAfterCopy)
{
writingController.TurnViewUpdateOn(false, false);
}
helper = null;
return rootID;
}