Microsoft.Zing.ZingDecompiler.GetUnaryOperator C# (CSharp) Méthode

GetUnaryOperator() private static méthode

private static GetUnaryOperator ( NodeType nodeType, bool &isFunctionStyle ) : string
nodeType NodeType
isFunctionStyle bool
Résultat string
        private static string GetUnaryOperator(NodeType nodeType, out bool isFunctionStyle)
        {
            isFunctionStyle = false;

            switch (nodeType)
            {
                case NodeType.LogicalNot: return "!";
                case NodeType.Not: return "~";
                case NodeType.Neg: return "-";
                case NodeType.UnaryPlus: return "+";
                case NodeType.Sizeof: isFunctionStyle = true; return "sizeof";
                case NodeType.OutAddress: return "out ";
                case NodeType.RefAddress: return "ref ";
                case NodeType.Parentheses: isFunctionStyle = true; return string.Empty;

                default:
                    throw new NotImplementedException("Unary operator not supported");
            }
        }
    }