Esempio n. 1
0
 internal ServiceGroupMember(
     Uri serviceName,
     ServiceGroupMemberMemberList serviceGroupMemberMembers)
 {
     this.ServiceName = serviceName;
     this.ServiceGroupMemberMembers = serviceGroupMemberMembers;
 }
Esempio n. 2
0
        internal static unsafe ServiceGroupMember CreateFromNative(
            NativeTypes.FABRIC_SERVICE_GROUP_MEMBER_QUERY_RESULT_ITEM nativeResultItem)
        {
            NativeTypes.FABRIC_SERVICE_GROUP_MEMBER_MEMBER_QUERY_RESULT_LIST *nativeServiceGroupMembmerQueryResult =
                (NativeTypes.FABRIC_SERVICE_GROUP_MEMBER_MEMBER_QUERY_RESULT_LIST *)nativeResultItem.Members;

            ServiceGroupMemberMemberList serviceGroupMemberMemberList = ServiceGroupMemberMemberList.CreateFromNativeList(nativeServiceGroupMembmerQueryResult);

            ServiceGroupMember serviceGroupMember =
                new ServiceGroupMember(new Uri(NativeTypes.FromNativeString(nativeResultItem.ServiceName)), serviceGroupMemberMemberList);

            return(serviceGroupMember);
        }
        internal static unsafe ServiceGroupMemberMemberList CreateFromNativeList(
            NativeTypes.FABRIC_SERVICE_GROUP_MEMBER_MEMBER_QUERY_RESULT_LIST *nativeList)
        {
            var retval = new ServiceGroupMemberMemberList();

            var nativeItemArray = (NativeTypes.FABRIC_SERVICE_GROUP_MEMBER_MEMBER_QUERY_RESULT_ITEM *)nativeList->Items;

            for (int i = 0; i < nativeList->Count; ++i)
            {
                var nativeItem = *(nativeItemArray + i);
                var item       = ServiceGroupMemberMember.CreateFromNative(nativeItem);
                if (item != null)
                {
                    retval.Add(item);
                }
            }

            return(retval);
        }