示例#1
0
 internal StatelessServiceGroup(
     Uri serviceName,
     string serviceTypeName,
     string serviceManifestVersion,
     HealthState healthState,
     ServiceStatus serviceStatus,
     ServiceGroupMemberList members)
     : base(ServiceKind.Stateless, serviceName, serviceTypeName, serviceManifestVersion, healthState, serviceStatus, members)
 {
 }
示例#2
0
 internal static unsafe StatelessServiceGroup FromNative(NativeTypes.FABRIC_STATELESS_SERVICE_GROUP_QUERY_RESULT_ITEM nativeStatelessServiceGroupQueryResult,
                                                         ServiceGroupMemberList members)
 {
     return(new StatelessServiceGroup(
                new Uri(NativeTypes.FromNativeString(nativeStatelessServiceGroupQueryResult.ServiceName)),
                NativeTypes.FromNativeString(nativeStatelessServiceGroupQueryResult.ServiceTypeName),
                NativeTypes.FromNativeString(nativeStatelessServiceGroupQueryResult.ServiceManifestVersion),
                (HealthState)nativeStatelessServiceGroupQueryResult.HealthState,
                (ServiceStatus)nativeStatelessServiceGroupQueryResult.ServiceStatus,
                members));
 }
示例#3
0
 internal StatefulServiceGroup(
     Uri serviceName,
     string serviceTypeName,
     string serviceManifestVersion,
     bool hasPersistedState,
     HealthState healthState,
     ServiceStatus serviceStatus,
     ServiceGroupMemberList members)
     : base(ServiceKind.Stateful, serviceName, serviceTypeName, serviceManifestVersion, healthState, serviceStatus, members)
 {
     this.HasPersistedState = hasPersistedState;
 }
        internal static unsafe ServiceGroupMemberList CreateFromNativeList(
            NativeTypes.FABRIC_SERVICE_GROUP_MEMBER_QUERY_RESULT_LIST *nativeList)
        {
            var retval = new ServiceGroupMemberList();

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

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

            return(retval);
        }