/// <summary>
        /// Converts a collection of protocol layer objects to object layer collection objects, with each object marked readonly
        /// and returned as a readonly collection.
        /// </summary>
        internal static IReadOnlyList <NetworkSecurityGroupRule> ConvertFromProtocolCollectionReadOnly(IEnumerable <Models.NetworkSecurityGroupRule> protoCollection)
        {
            IReadOnlyList <NetworkSecurityGroupRule> converted =
                UtilitiesInternal.CreateObjectWithNullCheck(
                    UtilitiesInternal.CollectionToNonThreadSafeCollection(
                        items: protoCollection,
                        objectCreationFunc: o => new NetworkSecurityGroupRule(o).Freeze()), o => o.AsReadOnly());

            return(converted);
        }
Пример #2
0
        /// <summary>
        /// Converts a collection of protocol layer objects to object layer collection objects, with each object marked readonly
        /// and returned as a readonly collection.
        /// </summary>
        internal static IReadOnlyList <VMExtension> ConvertFromProtocolCollectionReadOnly(IEnumerable <Models.VMExtension> protoCollection)
        {
            IReadOnlyList <VMExtension> converted =
                UtilitiesInternal.CreateObjectWithNullCheck(
                    UtilitiesInternal.CollectionToNonThreadSafeCollection(
                        items: protoCollection,
                        objectCreationFunc: o => new VMExtension(o).Freeze()), o => o.AsReadOnly());

            return(converted);
        }
Пример #3
0
        /// <summary>
        /// Converts a collection of protocol layer objects to object layer collection objects, with each object marked readonly
        /// and returned as a readonly collection.
        /// </summary>
        internal static IReadOnlyList <ApplicationPackageReference> ConvertFromProtocolCollectionReadOnly(IEnumerable <Models.ApplicationPackageReference> protoCollection)
        {
            IReadOnlyList <ApplicationPackageReference> converted =
                UtilitiesInternal.CreateObjectWithNullCheck(
                    UtilitiesInternal.CollectionToNonThreadSafeCollection(
                        items: protoCollection,
                        objectCreationFunc: o => new ApplicationPackageReference(o).Freeze()), o => o.AsReadOnly());

            return(converted);
        }