예제 #1
0
        private static NodeId GetNodeIdFromNodeNameHelper(
            string nodeName,
            string rolesForWhichToUseV1Generator,
            bool useV2NodeIdGenerator,
            string nodeIdGeneratorVersion)
        {
            using (var pin = new PinCollection())
            {
                NativeTypes.FABRIC_NODE_ID nativeNodeId;

                NativeCommon.FabricGetNodeIdFromNodeName(
                    pin.AddBlittable(nodeName),
                    pin.AddBlittable(rolesForWhichToUseV1Generator),
                    NativeTypes.ToBOOLEAN(useV2NodeIdGenerator),
                    pin.AddBlittable(nodeIdGeneratorVersion),
                    out nativeNodeId);

                return(NativeTypes.FromNativeNodeId(nativeNodeId));
            }
        }