Exemplo n.º 1
0
        private short GetStringId(IBamlString stringInfo)
        {
            switch (stringInfo.Kind)
            {
            case BamlStringKind.Declaration:
            {
                short stringId;
                if (!_stringToID.TryGetValue((BamlStringInfo)stringInfo, out stringId))
                {
                    throw new BamlException(SR.BamlLoadError);
                }

                return(stringId);
            }

            case BamlStringKind.Known:
            {
                short stringId = (short)((BamlKnownString)stringInfo).KnownCode;
                return((short)-stringId);
            }

            default:
                throw new NotImplementedException();
            }
        }
 public BamlPresentationOptionsAttribute(string value, IBamlString name)
 {
     _value = value;
     _name  = name;
 }
Exemplo n.º 3
0
 public BamlDefAttributeKeyString(IBamlString value, BamlNode valueNode, bool shared, bool sharedSet)
     : this(value, valueNode)
 {
     _shared    = shared;
     _sharedSet = sharedSet;
 }
Exemplo n.º 4
0
 public BamlDefAttributeKeyString(IBamlString value, BamlNode valueNode)
 {
     _value     = value;
     _valueNode = valueNode;
 }
 public BamlDefAttribute(IBamlString name, string value)
 {
     _name  = name;
     _value = value;
 }
Exemplo n.º 6
0
 public BamlTextWithId(IBamlString value)
 {
     _value = value;
 }
 public BamlPropertyStringReference(IBamlString value, IBamlProperty declaringProperty)
 {
     _value             = value;
     _declaringProperty = declaringProperty;
 }
Exemplo n.º 8
0
 public BamlExtensionStringValue(IBamlString value)
 {
     _value = value;
 }