本文整理汇总了C#中Microsoft.Tools.WindowsInstallerXml.SourceLineNumberCollection类的典型用法代码示例。如果您正苦于以下问题:C# SourceLineNumberCollection类的具体用法?C# SourceLineNumberCollection怎么用?C# SourceLineNumberCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SourceLineNumberCollection类属于Microsoft.Tools.WindowsInstallerXml命名空间,在下文中一共展示了SourceLineNumberCollection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IfDefEventArgs
public IfDefEventArgs(SourceLineNumberCollection sourceLineNumbers, bool isIfDef, bool isDefined, string variableName)
{
this.sourceLineNumbers = sourceLineNumbers;
this.isIfDef = isIfDef;
this.isDefined = isDefined;
this.variableName = variableName;
}
示例2: WixUnknownMergeLanguageException
/// <summary>
/// Instantiate a new WixUnknownMergeLanguageException.
/// </summary>
/// <param name="sourceLineNumbers">Source line information of the exception.</param>
/// <param name="mergeId">Name of the file which could not be found.</param>
/// <param name="mergeModulePath">Path to the merge module.</param>
/// <param name="lcid">User-specified lcid.</param>
/// <param name="innerException">The exception that is the cause of the current exception.</param>
public WixUnknownMergeLanguageException(SourceLineNumberCollection sourceLineNumbers, string mergeId, string mergeModulePath, int lcid, Exception innerException)
: base(sourceLineNumbers, ExceptionType, innerException)
{
this.mergeId = mergeId;
this.mergeModulePath = mergeModulePath;
this.lcid = lcid;
}
示例3: ParseElement
/// <summary>
/// Processes an element for the Compiler.
/// </summary>
/// <param name="sourceLineNumbers">Source line number for the parent element.</param>
/// <param name="parentElement">Parent element of element to process.</param>
/// <param name="element">Element to process.</param>
/// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
public override void ParseElement(SourceLineNumberCollection sourceLineNumbers, XmlElement parentElement, XmlElement element)
{
switch (parentElement.LocalName)
{
case "File":
switch (element.LocalName)
{
case "SnapIn":
string fileName = parentElement.GetAttribute("LongName");
if (null == fileName || String.Empty == fileName)
{
fileName = parentElement.GetAttribute("Name");
}
XmlElement grandparentElement = (XmlElement)parentElement.ParentNode;
string componentId = grandparentElement.GetAttribute("Id");
this.ParseSnapInElement(element, fileName, componentId);
break;
default:
this.Core.UnexpectedElement(parentElement, element);
break;
}
break;
default:
this.Core.UnexpectedElement(parentElement, element);
break;
}
}
示例4: ParseAttribute
/// <summary>
/// Processes an attribute for the Compiler.
/// </summary>
/// <param name="sourceLineNumbers">Source line number for the parent element.</param>
/// <param name="parentElement">Parent element of element to process.</param>
/// <param name="attribute">Attribute to process.</param>
/// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
public override void ParseAttribute(SourceLineNumberCollection sourceLineNumbers, XmlElement parentElement, XmlAttribute attribute, Dictionary<string, string> contextValues)
{
switch (parentElement.LocalName)
{
case "ExePackage":
case "MsiPackage":
case "MspPackage":
case "MsuPackage":
string packageId;
if (!contextValues.TryGetValue("PackageId", out packageId) || String.IsNullOrEmpty(packageId))
{
this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, parentElement.LocalName, "Id", attribute.LocalName));
}
else
{
switch (attribute.LocalName)
{
case "PrereqSupportPackage":
if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attribute))
{
Row row = this.Core.CreateRow(sourceLineNumbers, "MbaPrerequisiteSupportPackage");
row[0] = packageId;
}
break;
default:
this.Core.UnexpectedAttribute(sourceLineNumbers, attribute);
break;
}
}
break;
case "Variable":
// at the time the extension attribute is parsed, the compiler might not yet have
// parsed the Name attribute, so we need to get it directly from the parent element.
string variableName = parentElement.GetAttribute("Name");
if (String.IsNullOrEmpty(variableName))
{
this.Core.OnMessage(WixErrors.ExpectedParentWithAttribute(sourceLineNumbers, "Variable", "Overridable", "Name"));
}
else
{
switch (attribute.LocalName)
{
case "Overridable":
if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attribute))
{
Row row = this.Core.CreateRow(sourceLineNumbers, "WixStdbaOverridableVariable");
row[0] = variableName;
}
break;
default:
this.Core.UnexpectedAttribute(sourceLineNumbers, attribute);
break;
}
}
break;
default:
this.Core.UnexpectedAttribute(sourceLineNumbers, attribute);
break;
}
}
示例5: WixGenericMessageEventArgs
/// <summary>
/// Creates a new generc message event arg.
/// </summary>
/// <param name="sourceLineNumbers">Source line numbers for the message.</param>
/// <param name="id">Id for the message.</param>
/// <param name="level">Level for the message.</param>
/// <param name="format">Format message for arguments.</param>
/// <param name="messageArgs">Arguments for the format string.</param>
public WixGenericMessageEventArgs(SourceLineNumberCollection sourceLineNumbers, int id, MessageLevel level, string format, params object[] messageArgs)
: base(sourceLineNumbers, id, format, messageArgs)
{
this.resourceManager = new GenericResourceManager();
this.Level = level;
}
示例6: ParseAttribute
/// <summary>
/// Processes an attribute for the Compiler.
/// </summary>
/// <param name="sourceLineNumbers">Source line number for the parent element.</param>
/// <param name="parentElement">Parent element of element to process.</param>
/// <param name="attribute">Attribute to process.</param>
/// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
public override void ParseAttribute(SourceLineNumberCollection sourceLineNumbers, XmlElement parentElement, XmlAttribute attribute, Dictionary<string, string> contextValues)
{
switch (parentElement.LocalName)
{
case "Extension":
// at the time the IsRichSavedGame extension attribute is parsed, the compiler
// might not yet have parsed the Id attribute, so we need to get it directly
// from the parent element and put it into the contextValues dictionary.
string extensionId = parentElement.GetAttribute("Id");
if (String.IsNullOrEmpty(extensionId))
{
this.Core.OnMessage(WixErrors.ExpectedParentWithAttribute(sourceLineNumbers, "Extension", "IsRichSavedGame", "Id"));
}
else
{
contextValues["ExtensionId"] = extensionId;
switch (attribute.LocalName)
{
case "IsRichSavedGame":
if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attribute))
{
this.ProcessIsRichSavedGameAttribute(sourceLineNumbers, contextValues);
}
break;
default:
this.Core.UnexpectedAttribute(sourceLineNumbers, attribute);
break;
}
}
break;
default:
this.Core.UnexpectedElement(parentElement, parentElement);
break;
}
}
示例7: Output
/// <summary>
/// Creates a new empty output object.
/// </summary>
/// <param name="sourceLineNumbers">The source line information for the output.</param>
internal Output(SourceLineNumberCollection sourceLineNumbers)
{
this.sections = new SectionCollection();
this.sourceLineNumbers = sourceLineNumbers;
this.subStorages = new ArrayList();
this.tables = new TableCollection();
}
示例8: WixInvalidElementException
/// <summary>
/// Instantiate new WixInvalidElementException.
/// </summary>
/// <param name="sourceLineNumbers">Source line information of the exception.</param>
/// <param name="elementName">Name of the invalid element.</param>
/// <param name="detail">Detail about the exception.</param>
/// <param name="id">Id of the invalid element.</param>
public WixInvalidElementException(SourceLineNumberCollection sourceLineNumbers, string elementName, string detail, string id)
: base(sourceLineNumbers, WixExceptionType.InvalidElement)
{
this.element = elementName;
this.id = id;
this.detail = detail;
}
示例9: ParseElement
/// <summary>
/// Processes an element for the Compiler.
/// </summary>
/// <param name="sourceLineNumbers">Source line number for the parent element.</param>
/// <param name="parentElement">Parent element of element to process.</param>
/// <param name="element">Element to process.</param>
/// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
public override void ParseElement(SourceLineNumberCollection sourceLineNumbers, XmlElement parentElement, XmlElement element, params string[] contextValues)
{
switch (parentElement.LocalName)
{
case "Bundle":
case "Fragment":
switch (element.LocalName)
{
case "Condition":
this.ParseConditionElement(element);
break;
default:
this.Core.UnexpectedElement(parentElement, element);
break;
}
break;
case "BootstrapperApplicationRef":
switch (element.LocalName)
{
case "WixStandardBootstrapperApplication":
this.ParseWixStandardBootstrapperApplicationElement(element);
break;
case "WixManagedBootstrapperApplicationHost":
this.ParseWixManagedBootstrapperApplicationHostElement(element);
break;
default:
this.Core.UnexpectedElement(parentElement, element);
break;
}
break;
default:
this.Core.UnexpectedElement(parentElement, element);
break;
}
}
示例10: MessageEventArgs
/// <summary>
/// Creates a new MessageEventArgs.
/// </summary>
/// <param name="sourceLineNumbers">Source line numbers for the message.</param>
/// <param name="id">Id for the message.</param>
/// <param name="level">Level for the message.</param>
/// <param name="resourceName">Name of the resource.</param>
/// <param name="messageArgs">Arguments for the format string.</param>
public MessageEventArgs(SourceLineNumberCollection sourceLineNumbers, int id, int level, string resourceName, params object[] messageArgs)
{
this.sourceLineNumbers = sourceLineNumbers;
this.id = id;
this.level = level;
this.resourceName = resourceName;
this.messageArgs = messageArgs;
}
示例11: WixDuplicatePrimaryKeyException
/// <summary>
/// Instantiate a new WixDuplicatePrimaryKeyException.
/// </summary>
/// <param name="sourceLineNumbers">Source line information of the exception.</param>
/// <param name="tableName">Name of the table with duplicate primary keys.</param>
/// <param name="keyValues">List of key values that are duplicated.</param>
/// <param name="columnNames">List of columns with duplicated values.</param>
/// <param name="detail">Detail information about the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception.</param>
public WixDuplicatePrimaryKeyException(SourceLineNumberCollection sourceLineNumbers, string tableName, ArrayList keyValues, ArrayList columnNames, string detail, Exception innerException)
: base(sourceLineNumbers, WixExceptionType.DuplicateSymbol, innerException)
{
this.tableName = tableName;
this.keyValues = keyValues;
this.columnNames = columnNames;
this.detail = detail;
}
示例12: WixProhibitedAttributeException
/// <summary>
/// Instantiate a new WixProhibitedAttributeException.
/// </summary>
/// <param name="sourceLineNumbers">Source line information of the exception.</param>
/// <param name="elementName">Name of the element containing the prohibited attribute.</param>
/// <param name="attributeName">Name of the prohibited attribute.</param>
/// <param name="id">Id of the element containing the prohibited attribute.</param>
/// <param name="otherAttribute">Name of another attribute that makes this one prohibited.</param>
/// <param name="otherAttributeValue">Value of another attribute that makes this one prohibited.</param>
public WixProhibitedAttributeException(SourceLineNumberCollection sourceLineNumbers, string elementName, string attributeName, string id, string otherAttribute, string otherAttributeValue)
: base(sourceLineNumbers, WixExceptionType.ProhibitedAttribute)
{
this.element = elementName;
this.id = id;
this.attribute = attributeName;
this.otherAttribute = otherAttribute;
this.otherAttributeValue = otherAttributeValue;
}
示例13: Row
/// <summary>
/// Creates a row that belongs to a table.
/// </summary>
/// <param name="sourceLineNumbers">Original source lines for this row.</param>
/// <param name="table">Table this row belongs to and should get its column definitions from.</param>
/// <remarks>The compiler should use this constructor exclusively.</remarks>
public Row(SourceLineNumberCollection sourceLineNumbers, Table table)
: this(sourceLineNumbers, (null != table ? table.Definition : null))
{
if (null == table)
{
throw new ArgumentNullException("table");
}
this.table = table;
}
示例14: FileRow
/// <summary>
/// Creates a File row that belongs to a table.
/// </summary>
/// <param name="sourceLineNumbers">Original source lines for this row.</param>
/// <param name="table">Table this File row belongs to and should get its column definitions from.</param>
public FileRow(SourceLineNumberCollection sourceLineNumbers, Table table)
: base(sourceLineNumbers, table)
{
this.assemblyType = FileAssemblyType.NotAnAssembly;
this.previousSource = new string[1];
this.previousSymbols = new string[1];
this.previousRetainOffsets = new string[1];
this.previousRetainLengths = new string[1];
this.previousIgnoreOffsets = new string[1];
this.previousIgnoreLengths = new string[1];
}
示例15: ParseElement
/// <summary>
/// Processes an element for the Compiler.
/// </summary>
/// <param name="sourceLineNumbers">Source line number for the parent element.</param>
/// <param name="parentElement">Parent element of element to process.</param>
/// <param name="element">Element to process.</param>
/// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
public override void ParseElement(SourceLineNumberCollection sourceLineNumbers, XmlElement parentElement, XmlElement element, params string[] contextValues)
{
switch (parentElement.LocalName)
{
case "Component":
switch (element.LocalName)
{
case "VsixPackage":
this.ParseVsixPackageElement(element, contextValues[0], null);
break;
default:
base.ParseElement(sourceLineNumbers, parentElement, element, contextValues);
break;
}
break;
case "File":
switch (element.LocalName)
{
case "HelpCollection":
this.ParseHelpCollectionElement(element, contextValues[0]);
break;
case "HelpFile":
this.ParseHelpFileElement(element, contextValues[0]);
break;
case "VsixPackage":
this.ParseVsixPackageElement(element, contextValues[1], contextValues[0]);
break;
default:
base.ParseElement(sourceLineNumbers, parentElement, element, contextValues);
break;
}
break;
case "Fragment":
case "Module":
case "Product":
switch (element.LocalName)
{
case "HelpCollectionRef":
this.ParseHelpCollectionRefElement(element);
break;
case "HelpFilter":
this.ParseHelpFilterElement(element);
break;
default:
base.ParseElement(sourceLineNumbers, parentElement, element, contextValues);
break;
}
break;
default:
base.ParseElement(sourceLineNumbers, parentElement, element, contextValues);
break;
}
}