private short GetExtensionValueId(BamlExtensionValue extensionValue) { switch (extensionValue.ValueType) { case BamlExtensionValueType.Property: return(GetPropertyId(((BamlExtensionPropertyValue)extensionValue).Value)); case BamlExtensionValueType.Resource: { var resourceExtensionValue = (BamlExtensionResourceValue)extensionValue; short valueId = (short)resourceExtensionValue.Value; if (!resourceExtensionValue.IsKey) { valueId += 0xe8; } return((short)-valueId); } case BamlExtensionValueType.String: return(GetStringId(((BamlExtensionStringValue)extensionValue).Value)); case BamlExtensionValueType.Type: return(GetTypeId(((BamlExtensionTypeValue)extensionValue).Value)); default: throw new NotImplementedException(); } }
public BamlExtension(BamlExtensionType type, BamlExtensionValue value) { _type = type; _value = value; }
public BamlOptimizedStaticResource(BamlExtensionValue value, BamlOptimizedStaticResourceFlags flags) { _value = value; _flags = flags; }