Пример #1
0
        public static Func <IEngine, SubResource> CreateProximityPlacementGroupSubResourceFunc(
            this ResourceConfig <ResourceGroup> resourceGroup, string name)
        {
            if (name == null)
            {
                return(_ => null);
            }
            var id = ResourceId.TryParse(name);

            if (id == null)
            {
                var ppgConfig = resourceGroup.CreateProximityPlacementGroupConfig(name);
                return(e => e.GetReference(ppgConfig));
            }
            return(_ => new SubResource(name));
        }