/// <summary>
 /// Initializes a new instance of the <see cref="PutMobileScanSetupRequest" /> class.
 /// </summary>
 /// <param name="AssessmentTypeId">The assessment type id (required).</param>
 /// <param name="FrameworkType">The framework type (required).</param>
 /// <param name="PlatformType">The platform type (required).</param>
 /// <param name="TimeZone">The time zone (required).</param>
 /// <param name="UserAccountsRequried">Indicates if user accounts are required.</param>
 /// <param name="UserAccounts">List of user accounts.</param>
 /// <param name="Notes">Notes.</param>
 /// <param name="VpnRequired">Indicates if VPN is required.</param>
 /// <param name="VpnUserName">The VPN username.</param>
 /// <param name="VpnPassword">The VPN password.</param>
 /// <param name="HasMultiFactorAuthentication">Indicates if multi-factor authentication is used.</param>
 /// <param name="MultiFactorAuthenticationNotes">Multi-factor authentication notes.</param>
 /// <param name="IntrusionDetectionSystem">Indicates if intrusion detection system is used.</param>
 /// <param name="IntrusionPreventionSystem">Indicates if intrusion prevention system is used.</param>
 /// <param name="WebApplicationFirewall">Indicates if web application firewall is used.</param>
 /// <param name="ProxyServers">Indicates if proxy servers are used.</param>
 /// <param name="LoadBalancer">Indicates if load balancer is used.</param>
 /// <param name="PreAssessmentCall">Indicates if the customer should be contacted prior to beginning the assessment.</param>
 public PutMobileScanSetupRequest(int?AssessmentTypeId = default(int?), FrameworkTypeEnum FrameworkType = default(FrameworkTypeEnum), PlatformTypeEnum PlatformType = default(PlatformTypeEnum), string TimeZone = default(string), bool?UserAccountsRequried = default(bool?), List <MobileScanUserAccount> UserAccounts = default(List <MobileScanUserAccount>), string Notes = default(string), bool?VpnRequired = default(bool?), string VpnUserName = default(string), string VpnPassword = default(string), bool?HasMultiFactorAuthentication = default(bool?), string MultiFactorAuthenticationNotes = default(string), bool?IntrusionDetectionSystem = default(bool?), bool?IntrusionPreventionSystem = default(bool?), bool?WebApplicationFirewall = default(bool?), bool?ProxyServers = default(bool?), bool?LoadBalancer = default(bool?), bool?PreAssessmentCall = default(bool?))
 {
     // to ensure "AssessmentTypeId" is required (not null)
     if (AssessmentTypeId == null)
     {
         throw new InvalidDataException("AssessmentTypeId is a required property for PutMobileScanSetupRequest and cannot be null");
     }
     else
     {
         this.AssessmentTypeId = AssessmentTypeId;
     }
     // to ensure "FrameworkType" is required (not null)
     if (FrameworkType == null)
     {
         throw new InvalidDataException("FrameworkType is a required property for PutMobileScanSetupRequest and cannot be null");
     }
     else
     {
         this.FrameworkType = FrameworkType;
     }
     // to ensure "PlatformType" is required (not null)
     if (PlatformType == null)
     {
         throw new InvalidDataException("PlatformType is a required property for PutMobileScanSetupRequest and cannot be null");
     }
     else
     {
         this.PlatformType = PlatformType;
     }
     // to ensure "TimeZone" is required (not null)
     if (TimeZone == null)
     {
         throw new InvalidDataException("TimeZone is a required property for PutMobileScanSetupRequest and cannot be null");
     }
     else
     {
         this.TimeZone = TimeZone;
     }
     this.UserAccountsRequried = UserAccountsRequried;
     this.UserAccounts         = UserAccounts;
     this.Notes       = Notes;
     this.VpnRequired = VpnRequired;
     this.VpnUserName = VpnUserName;
     this.VpnPassword = VpnPassword;
     this.HasMultiFactorAuthentication   = HasMultiFactorAuthentication;
     this.MultiFactorAuthenticationNotes = MultiFactorAuthenticationNotes;
     this.IntrusionDetectionSystem       = IntrusionDetectionSystem;
     this.IntrusionPreventionSystem      = IntrusionPreventionSystem;
     this.WebApplicationFirewall         = WebApplicationFirewall;
     this.ProxyServers      = ProxyServers;
     this.LoadBalancer      = LoadBalancer;
     this.PreAssessmentCall = PreAssessmentCall;
 }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        //length = thisRail.movingSpeed * (thisRail.endTime - thisRail.startTime);
        length = thisRail.endPosition.x - thisRail.transform.position.x;
        if (lastCalculatedLength != length || lastPlatformType != thisRail.platformType)
        {
            GameObject firstPlatform = Instantiate(platformPrefab, transform);
            firstPlatform.GetComponent <SpriteRenderer>().sprite = selectedSprites[0];
            firstPlatform.transform.localPosition = new Vector3(selectedSprites[0].bounds.size.x / 2, 0f, 0f);
            platforms.Add(firstPlatform.GetComponent <SpriteRenderer>());

            float lastLength = platforms[0].bounds.size.x;

            if (lastLength >= length)
            {
                int randomIndex = Random.Range(0, selectedSolidSprites.Length);
                firstPlatform.GetComponent <SpriteRenderer>().sprite = selectedSolidSprites[randomIndex];
                firstPlatform.transform.localPosition = new Vector3(0.75f, 0f, 0f);
            }
            else
            {
                while (lastLength < length)
                {
                    int randomIndex = Random.Range(2, selectedSprites.Length);
                    if (sprites[randomIndex].bounds.size.x + lastLength > length)
                    {
                        GameObject nextPlatform = Instantiate(platformPrefab, transform);
                        nextPlatform.GetComponent <SpriteRenderer>().sprite = selectedSprites[1];
                        nextPlatform.transform.localPosition = new Vector3(lastLength + (selectedSprites[1].bounds.size.x / 2), 0f, 0f);
                        platforms.Add(nextPlatform.GetComponent <SpriteRenderer>());
                    }
                    else
                    {
                        GameObject nextPlatform = Instantiate(platformPrefab, transform);
                        nextPlatform.GetComponent <SpriteRenderer>().sprite = selectedSprites[randomIndex];
                        nextPlatform.transform.localPosition = new Vector3(lastLength + (selectedSprites[randomIndex].bounds.size.x / 2), 0f, 0f);
                        platforms.Add(nextPlatform.GetComponent <SpriteRenderer>());
                    }
                    lastLength += selectedSprites[randomIndex].bounds.size.x;
                }
            }

            lastCalculatedLength = length;
            lastPlatformType     = thisRail.platformType;
        }
    }
Exemplo n.º 3
0
 protected Entity(string id, PlatformTypeEnum platform, TState state = default(TState))
 {
     Id       = id;
     Platform = platform;
     State    = state;
 }