private static void SetAttributeOnObject(ISchemaElement schemaElement, string name, string value) { ISetAttributes setAttributes = schemaElement as ISetAttributes; if (setAttributes == null) { throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixHarvesterStrings.EXP_ISchemaElementDoesnotImplementISetAttribute, schemaElement.GetType().FullName)); } else { setAttributes.SetAttribute(name, value); } }
/// <summary> /// Sets an attribute on an ISchemaElement. /// </summary> /// <param name="schemaElement">Schema element to set attribute on.</param> /// <param name="name">Name of the attribute to set.</param> /// <param name="value">Value to set on the attribute.</param> private static void SetAttributeOnObject(ISchemaElement schemaElement, string name, string value) { ISetAttributes setAttributes = schemaElement as ISetAttributes; if (setAttributes == null) { throw new InvalidOperationException(String.Concat("ISchemaElement with name ", schemaElement.GetType().FullName.ToString(), " does not implement ISetAttributes.")); } else { setAttributes.SetAttribute(name, value); } }