Example #1
0
        public static XamlNodeType ToWpf(this XamlInstructionType omniNodeType)
        {
            switch (omniNodeType)
            {
            case XamlInstructionType.StartObject:
                return(XamlNodeType.StartObject);

            case XamlInstructionType.EndMember:
                return(XamlNodeType.EndMember);

            case XamlInstructionType.EndObject:
                return(XamlNodeType.EndObject);

            case XamlInstructionType.GetObject:
                return(XamlNodeType.GetObject);

            case XamlInstructionType.NamespaceDeclaration:
                return(XamlNodeType.NamespaceDeclaration);

            case XamlInstructionType.Value:
                return(XamlNodeType.Value);

            case XamlInstructionType.None:
                return(XamlNodeType.None);

            case XamlInstructionType.StartMember:
                return(XamlNodeType.StartMember);
            }

            throw new InvalidOperationException($"Cannot convert the value {omniNodeType} to a XamlNodeType for WPF.");
        }
Example #2
0
 public XamlInstruction(XamlInstructionType instructionType, object data)
     : this(instructionType)
 {
     this.data = data;
 }
Example #3
0
 public XamlInstruction(XamlInstructionType instructionType)
 {
     this.instructionType = instructionType;
     internalNodeType     = InternalNodeType.None;
     data = null;
 }
Example #4
0
 public XamlInstruction(XamlInstructionType instructionType, object data)
     : this(instructionType)
 {
     this.data = data;
 }
Example #5
0
 public XamlInstruction(XamlInstructionType instructionType)
 {
     this.instructionType = instructionType;
     internalNodeType = InternalNodeType.None;
     data = null;
 }
 public static System.Xaml.XamlNodeType ToWpf(this XamlInstructionType nodeType)
 {
     return((System.Xaml.XamlNodeType)Enum.Parse(typeof(XamlNodeType), nodeType.ToString()));
 }