Ejemplo n.º 1
0
 /// <summary>
 /// Create notification information
 /// </summary>
 /// <param name="name">domain object name</param>
 /// <param name="operation">operation type</param>
 /// <param name="source">notification source</param>
 /// <param name="uri">identifiers</param>
 public NotifyInfo(string name, OperationEnum operation, SourceEnum source, string[] uri)
 {
     this.Name = name;
     this.Operation = operation;
     this.Source = source;
     this.URI = uri;
 }
Ejemplo n.º 2
0
        // ReSharper disable once InconsistentNaming
        protected static DmnModel MODEL(string dmnFile, SourceEnum source)
        {
            var file = FILE(dmnFile, source);

            if (source == SourceEnum.File)
            {
                return(DmnParser.Parse(file));
            }
            if (source == SourceEnum.File13)
            {
                return(DmnParser.Parse13(file));
            }

            throw new NotImplementedException();
        }
Ejemplo n.º 3
0
        private void SaveAllModelsForSource(IServiceProvider serviceProvider, SourceEnum source)
        {
            List <BrandSearchDto> brandsSearch = serviceProvider.GetService <BrandFinder>().GetBrandSearchDtos(source);
            AutoDbContext         dbContext    = serviceProvider.GetService <AutoDbContext>();

            foreach (BrandSearchDto brandSearch in brandsSearch)
            {
                IEnumerable <Model> models = serviceProvider.GetDataCollector(source).GetModels(brandSearch);

                foreach (Model model in models)
                {
                    dbContext.Models.Add(model);
                }

                dbContext.SaveChanges();
            }
        }
    public static DestEnum ToDestEnum(this SourceEnum sourceEnum)
    {
        DestEnum toDestEnum = 0;

        if ((sourceEnum & SourceEnum.SA) == SourceEnum.SA)
        {
            toDestEnum = toDestEnum | DestEnum.DA;
        }
        if ((sourceEnum & SourceEnum.SB) == SourceEnum.SB)
        {
            toDestEnum = toDestEnum | DestEnum.DB;
        }
        if ((sourceEnum & SourceEnum.SC) == SourceEnum.SC)
        {
            toDestEnum = toDestEnum | DestEnum.DC;
        }
        return(toDestEnum);
    }
    public static SourceEnum ToSourceEnum(this DestEnum destEnum)
    {
        SourceEnum toSourceEnum = 0x0;

        if ((destEnum & DestEnum.DA) == DestEnum.DA)
        {
            toSourceEnum |= SourceEnum.SA;
        }
        if ((destEnum & DestEnum.DB) == DestEnum.DB)
        {
            toSourceEnum |= SourceEnum.SB;
        }
        if ((destEnum & DestEnum.DC) == DestEnum.DC)
        {
            toSourceEnum |= SourceEnum.SC;
        }
        return(toSourceEnum);
    }
Ejemplo n.º 6
0
 private static Expression <Func <Model, ModelSearchDto> > ModelToSearchDto(SourceEnum source)
 {
     return(m => new ModelSearchDto
     {
         Id = m.Id,
         Name = m.Name,
         BrandName = m.Brand.Name,
         ModelKeys = m
                     .ModelKeys
                     .Where(mk => mk.SourceId == (int)source)
                     .Select(mk => mk.Key)
                     .Concat(m
                             .SubModels
                             .SelectMany(sm => sm
                                         .ModelKeys
                                         .Where(mk => mk.SourceId == (int)source)
                                         .Select(mk => mk.Key))).ToList(),
         BrandKey = m.Brand.BrandKeys.SingleOrDefault(bk => bk.SourceId == (int)source).Key
     });
 }
Ejemplo n.º 7
0
 public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader)
 {
     System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader));
     this.fieldpad            = binaryReader.ReadBytes(64);
     this.DestinationType     = ((DestinationTypeEnum)(binaryReader.ReadInt16()));
     this.Destination         = ((DestinationEnum)(binaryReader.ReadInt16()));
     this.Source              = ((SourceEnum)(binaryReader.ReadInt16()));
     this.fieldpad0           = binaryReader.ReadBytes(2);
     this.InBounds            = binaryReader.ReadRange();
     this.OutBounds           = binaryReader.ReadRange();
     this.fieldpad1           = binaryReader.ReadBytes(64);
     this.TintColorLowerBound = binaryReader.ReadColorR8G8B8();
     this.TintColorUpperBound = binaryReader.ReadColorR8G8B8();
     this.PeriodicFunction    = ((PeriodicFunctionEnum)(binaryReader.ReadInt16()));
     this.fieldpad2           = binaryReader.ReadBytes(2);
     this.FunctionPeriod      = binaryReader.ReadSingle();
     this.FunctionPhase       = binaryReader.ReadSingle();
     this.fieldpad3           = binaryReader.ReadBytes(32);
     return(pointerQueue);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="InputCurrencyConversion" /> class.
 /// </summary>
 /// <param name="input">Amount to convert (required).</param>
 /// <param name="source">source (required) (default to SourceEnum.USD).</param>
 /// <param name="target">target (required).</param>
 public InputCurrencyConversion(decimal input = default(decimal), SourceEnum source = SourceEnum.USD, TargetEnum target = default(TargetEnum))
 {
     this.Input  = input;
     this.Source = source;
     this.Target = target;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ImageManagementStreamCreateSpec" /> class.
 /// </summary>
 /// <param name="additionalDetails">Additional details about image management stream..</param>
 /// <param name="description">Image management stream description..</param>
 /// <param name="name">Image management stream name. (required).</param>
 /// <param name="operatingSystem">Operating system. * UNKNOWN: Unknown * WINDOWS_XP: Windows XP * WINDOWS_VISTA: Windows Vista * WINDOWS_7: Windows 7 * WINDOWS_8: Windows 8 * WINDOWS_10: Windows 10 * WINDOWS_SERVER_2003: Windows Server 2003 * WINDOWS_SERVER_2008: Windows Server 2008 * WINDOWS_SERVER_2008_R2: Windows Server 2008 R2 * WINDOWS_SERVER_2012: Windows Server 2012 * WINDOWS_SERVER_2012_R2: Windows Server 2012 R2 * WINDOWS_SERVER_2016_OR_ABOVE: Windows Server 2016 or above * LINUX_OTHER: Linux (other) * LINUX_SERVER_OTHER: Linux server (other) * LINUX_UBUNTU: Linux (Ubuntu) * LINUX_RHEL: Linux (Red Hat Enterprise) * LINUX_SUSE: Linux (Suse) * LINUX_CENTOS: Linux (CentOS) (required).</param>
 /// <param name="publisher">Image management stream publisher.</param>
 /// <param name="source">Image management stream source. * MARKET_PLACE: Image management stream is from market place. * UPLOADED: Image management stream is uploaded. * COPIED_FROM_STREAM: Image management stream is copied from another stream. * COPIED_FROM_VERSION: Image management stream is copied from a version. (required).</param>
 /// <param name="status">Image management stream status. * AVAILABLE: Image management stream is available for desktop pools/farms to be created. * DELETED: Image management stream is deleted. * DISABLED: Image management stream is disabled and no further desktop pools/farms can be created using the same. * FAILED: Image management stream creation has failed. * IN_PROGRESS: Image management stream creation is in progress. * PARTIALLY_AVAILABLE: Image management version for this stream could not be created in one or more environments. * PENDING: Image management stream is in pending state. (required).</param>
 public ImageManagementStreamCreateSpec(Dictionary <string, string> additionalDetails = default(Dictionary <string, string>), string description = default(string), string name = default(string), OperatingSystemEnum operatingSystem = default(OperatingSystemEnum), string publisher = default(string), SourceEnum source = default(SourceEnum), StatusEnum status = default(StatusEnum))
 {
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for ImageManagementStreamCreateSpec and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     // to ensure "operatingSystem" is required (not null)
     if (operatingSystem == null)
     {
         throw new InvalidDataException("operatingSystem is a required property for ImageManagementStreamCreateSpec and cannot be null");
     }
     else
     {
         this.OperatingSystem = operatingSystem;
     }
     // to ensure "source" is required (not null)
     if (source == null)
     {
         throw new InvalidDataException("source is a required property for ImageManagementStreamCreateSpec and cannot be null");
     }
     else
     {
         this.Source = source;
     }
     // to ensure "status" is required (not null)
     if (status == null)
     {
         throw new InvalidDataException("status is a required property for ImageManagementStreamCreateSpec and cannot be null");
     }
     else
     {
         this.Status = status;
     }
     this.AdditionalDetails = additionalDetails;
     this.Description       = description;
     this.Publisher         = publisher;
 }
Ejemplo n.º 10
0
 public DSUSBShutterRelease()
 {
     Name = "DSUSB Shutter Release";
     DeviceType = SourceEnum.ExternaExternalShutterRelease;
 }
Ejemplo n.º 11
0
 public DestEnum Map(SourceEnum source)
 {
     return((DestEnum)this.Map((int)source));
 }
Ejemplo n.º 12
0
        public static IDataCollector GetDataCollector(this IServiceProvider serviceProvider, SourceEnum sourceEnum)
        {
            DataCollectorFactory dataCollectorFactory = serviceProvider.GetService <DataCollectorFactory>();

            return(dataCollectorFactory.GetDataCollectorByType(sourceEnum));
        }
Ejemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DesktopPoolInfo" /> class.
 /// </summary>
 /// <param name="description">Description of the Desktop Pool. The maximum length is 1024 characters..</param>
 /// <param name="displayName">Display name of the Desktop Pool. The maximum length is 256 characters..</param>
 /// <param name="enabled">Indicates whether the Desktop Pool is enabled for brokering. (required).</param>
 /// <param name="id">Unique ID representing Desktop Pool. (required).</param>
 /// <param name="name">Name of the Desktop Pool. The maximum length is 64 characters. (required).</param>
 /// <param name="settings">Settings related to the Desktop Pool. (required).</param>
 /// <param name="source">Source of the Machines in this Desktop Pool. * INSTANT_CLONE: The Desktop Pool uses instant clone technology for provisioning the machines.Applicable for AUTOMATED type desktop pools. * LINKED_CLONE: The Desktop Pool uses linked clone technology for provisioning the machines.Applicable for AUTOMATED type desktop pools. * VIRTUAL_CENTER: The Desktop Pool uses Virtual Center as source for provisioning the machines.Applicable for AUTOMATED and MANUAL type desktop pools. * RDS: The Desktop Pool is backed by Farm. The Farm used in this Desktop Pool can be of any Source. * UNMANAGED: The Desktop Pool holds the non-vCenter source machines that includes physical computers,blade PCs and non-vCenter servers. Applicable for MANUAL type desktop pools. (required).</param>
 /// <param name="type">Type of the Desktop Pool. * AUTOMATED: Automated Desktop Pool. * MANUAL: Manual Desktop Pool. * RDS: RDS Desktop Pool. (required).</param>
 public DesktopPoolInfo(string description = default(string), string displayName = default(string), bool?enabled = default(bool?), string id = default(string), string name = default(string), DesktopPoolSettings settings = default(DesktopPoolSettings), SourceEnum source = default(SourceEnum), TypeEnum type = default(TypeEnum))
 {
     // to ensure "enabled" is required (not null)
     if (enabled == null)
     {
         throw new InvalidDataException("enabled is a required property for DesktopPoolInfo and cannot be null");
     }
     else
     {
         this.Enabled = enabled;
     }
     // to ensure "id" is required (not null)
     if (id == null)
     {
         throw new InvalidDataException("id is a required property for DesktopPoolInfo and cannot be null");
     }
     else
     {
         this.Id = id;
     }
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for DesktopPoolInfo and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     // to ensure "settings" is required (not null)
     if (settings == null)
     {
         throw new InvalidDataException("settings is a required property for DesktopPoolInfo and cannot be null");
     }
     else
     {
         this.Settings = settings;
     }
     // to ensure "source" is required (not null)
     if (source == null)
     {
         throw new InvalidDataException("source is a required property for DesktopPoolInfo and cannot be null");
     }
     else
     {
         this.Source = source;
     }
     // to ensure "type" is required (not null)
     if (type == null)
     {
         throw new InvalidDataException("type is a required property for DesktopPoolInfo and cannot be null");
     }
     else
     {
         this.Type = type;
     }
     this.Description = description;
     this.DisplayName = displayName;
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QuantFormula" /> class.
 /// </summary>
 /// <param name="source">source (required).</param>
 public QuantFormula(SourceEnum source = default(SourceEnum))
 {
     this.Source = source;
 }
Ejemplo n.º 15
0
 public EventItem(SourceEnum source, SourceTypeEnum sourceType, string data)
 {
     Data = data;
     Source = source;
     SourceType = sourceType;
 }
Ejemplo n.º 16
0
 public DSUSBShutterRelease()
 {
     Name       = "DSUSB Shutter Release";
     DeviceType = SourceEnum.ExternaExternalShutterRelease;
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QuantIdentifierUniverse" /> class.
 /// </summary>
 /// <param name="universeType">universeType (required).</param>
 /// <param name="identifiers">identifiers (required).</param>
 /// <param name="source">source (required).</param>
 public QuantIdentifierUniverse(UniverseTypeEnum universeType = default(UniverseTypeEnum), List <string> identifiers = default(List <string>), SourceEnum source = default(SourceEnum))
 {
     this.UniverseType = universeType;
     // to ensure "identifiers" is required (not null)
     this.Identifiers = identifiers ?? throw new ArgumentNullException("identifiers is a required property for QuantIdentifierUniverse and cannot be null");
     this.Source      = source;
 }
Ejemplo n.º 18
0
 public MultiCameraBoxShutterRelease()
 {
     Name       = "Multi camera Shutter Release";
     DeviceType = SourceEnum.ExternaExternalShutterRelease;
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QuantFdsDate" /> class.
 /// </summary>
 /// <param name="startDate">startDate (required).</param>
 /// <param name="endDate">endDate (required).</param>
 /// <param name="source">source (required).</param>
 /// <param name="frequency">frequency (required).</param>
 /// <param name="calendar">calendar (required).</param>
 public QuantFdsDate(string startDate = default(string), string endDate = default(string), SourceEnum source = default(SourceEnum), string frequency = default(string), string calendar = default(string))
 {
     // to ensure "startDate" is required (not null)
     this.StartDate = startDate ?? throw new ArgumentNullException("startDate is a required property for QuantFdsDate and cannot be null");
     // to ensure "endDate" is required (not null)
     this.EndDate = endDate ?? throw new ArgumentNullException("endDate is a required property for QuantFdsDate and cannot be null");
     this.Source  = source;
     // to ensure "frequency" is required (not null)
     this.Frequency = frequency ?? throw new ArgumentNullException("frequency is a required property for QuantFdsDate and cannot be null");
     // to ensure "calendar" is required (not null)
     this.Calendar = calendar ?? throw new ArgumentNullException("calendar is a required property for QuantFdsDate and cannot be null");
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="QuantFqlExpression" /> class.
 /// </summary>
 /// <param name="expr">expr (required).</param>
 /// <param name="name">name (required).</param>
 /// <param name="source">source (required).</param>
 public QuantFqlExpression(string expr = default(string), string name = default(string), SourceEnum source = default(SourceEnum))
 {
     // to ensure "expr" is required (not null)
     this.Expr = expr ?? throw new ArgumentNullException("expr is a required property for QuantFqlExpression and cannot be null");
     // to ensure "name" is required (not null)
     this.Name   = name ?? throw new ArgumentNullException("name is a required property for QuantFqlExpression and cannot be null");
     this.Source = source;
 }
 public SerialPortShutterRelease()
 {
     Name       = "Serial Port Shutter Release";
     DeviceType = SourceEnum.ExternaExternalShutterRelease;
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QuantUniversalScreenUniverse" /> class.
 /// </summary>
 /// <param name="screen">screen (required).</param>
 /// <param name="source">source (required).</param>
 public QuantUniversalScreenUniverse(string screen = default(string), SourceEnum source = default(SourceEnum))
 {
     // to ensure "screen" is required (not null)
     this.Screen = screen ?? throw new ArgumentNullException("screen is a required property for QuantUniversalScreenUniverse and cannot be null");
     this.Source = source;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="QuantUniversalScreenParameter" /> class.
 /// </summary>
 /// <param name="referenceName">referenceName (required).</param>
 /// <param name="name">name (required).</param>
 /// <param name="source">source (required).</param>
 public QuantUniversalScreenParameter(string referenceName = default(string), string name = default(string), SourceEnum source = default(SourceEnum))
 {
     // to ensure "referenceName" is required (not null)
     this.ReferenceName = referenceName ?? throw new ArgumentNullException("referenceName is a required property for QuantUniversalScreenParameter and cannot be null");
     // to ensure "name" is required (not null)
     this.Name   = name ?? throw new ArgumentNullException("name is a required property for QuantUniversalScreenParameter and cannot be null");
     this.Source = source;
 }
 public SerialPortShutterRelease()
 {
     Name = "Serial Port Shutter Release";
     DeviceType = SourceEnum.ExternaExternalShutterRelease;
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QuantScreeningExpressionUniverse" /> class.
 /// </summary>
 /// <param name="universeExpr">universeExpr (required).</param>
 /// <param name="universeType">universeType (required).</param>
 /// <param name="securityExpr">securityExpr.</param>
 /// <param name="source">source (required).</param>
 public QuantScreeningExpressionUniverse(string universeExpr = default(string), UniverseTypeEnum universeType = default(UniverseTypeEnum), string securityExpr = default(string), SourceEnum source = default(SourceEnum))
 {
     // to ensure "universeExpr" is required (not null)
     this.UniverseExpr = universeExpr ?? throw new ArgumentNullException("universeExpr is a required property for QuantScreeningExpressionUniverse and cannot be null");
     this.UniverseType = universeType;
     this.Source       = source;
     this.SecurityExpr = securityExpr;
 }
Ejemplo n.º 26
0
 public ArduinoShutterRelease()
 {
     Name       = "Arduino Shutter Release (Serial)";
     DeviceType = SourceEnum.ExternaExternalShutterRelease;
 }
Ejemplo n.º 27
0
 public UsbRelayRelease()
 {
     Name       = "USB Relay Release";
     DeviceType = SourceEnum.ExternaExternalShutterRelease;
 }
 public MultiCameraBoxShutterRelease()
 {
     Name = "Multi camera Shutter Release";
     DeviceType = SourceEnum.ExternaExternalShutterRelease;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="QuantUniverse" /> class.
 /// </summary>
 /// <param name="source">source (required).</param>
 public QuantUniverse(SourceEnum source = default(SourceEnum))
 {
     this.Source = source;
 }
Ejemplo n.º 30
0
 public UsbRelayRelease()
 {
     Name = "USB Relay Release";
     DeviceType = SourceEnum.ExternaExternalShutterRelease;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="QuantAllUniversalScreenParameters" /> class.
 /// </summary>
 /// <param name="source">source (required).</param>
 public QuantAllUniversalScreenParameters(SourceEnum source = default(SourceEnum))
 {
     this.Source = source;
 }
Ejemplo n.º 32
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InputConvertTemperature" /> class.
 /// </summary>
 /// <param name="input">input (required).</param>
 /// <param name="source">source (required).</param>
 /// <param name="target">target (required).</param>
 public InputConvertTemperature(decimal input = default(decimal), SourceEnum source = default(SourceEnum), TargetEnum target = default(TargetEnum))
 {
     this.Input  = input;
     this.Source = source;
     this.Target = target;
 }
Ejemplo n.º 33
0
            /// <summary>
            /// For ScaleRotateYawPitchRollSpawn objects, the first 52 bytes are all
            /// generic for Halo 2.
            /// </summary>
            /// <param name="map">The HaloMap.Map.Map</param>
            public override void Read(Map map)
            {
                map.BR.BaseStream.Position = this.offset;
                this.PaletteIndex = map.BR.ReadInt16();
                this.NameIndex = map.BR.ReadInt16();
                this.Placements = (PlacementFlags)map.BR.ReadInt32();

                this.X = map.BR.ReadSingle();
                this.Y = map.BR.ReadSingle();
                this.Z = map.BR.ReadSingle();
                switch (map.HaloVersion)
                {
                    // Halo 1 Stores values in Degrees
                    case HaloVersionEnum.Halo1:
                        this.Yaw = Renderer.DegreeToRadian(map.BR.ReadSingle());
                        this.Pitch = Renderer.DegreeToRadian(map.BR.ReadSingle());
                        this.Roll = Renderer.DegreeToRadian(map.BR.ReadSingle());
                        break;

                    case HaloVersionEnum.Halo2:
                    case HaloVersionEnum.Halo2Vista:
                        // Is this correct? I think it should be Yaw, Pitch, Roll.
                        // Before cleaing code into this shared read section some spawns
                        // were Y,P,R and some were R,P,Y.
                        this.Yaw = map.BR.ReadSingle();
                        this.Pitch = map.BR.ReadSingle();
                        this.Roll = map.BR.ReadSingle();
                        this.Scale = map.BR.ReadSingle();

                        // None of this is currently saved
                        this.Transforms = (TransformFlags)map.BR.ReadInt16();
                        this.ManualBSPs = (ManualBSPFlags)map.BR.ReadInt16();
                        this.UniqueID = map.BR.ReadUInt32();
                        this.OriginBSP = map.BR.ReadInt16();
                        this.MetaSpawnType = (SpawnTypeEnum)map.BR.ReadByte();
                        this.Source = (SourceEnum)map.BR.ReadByte();
                        this.BSPPolicy = (BSPPolicyEnum)map.BR.ReadByte(); ;
                        this.Unused = map.BR.ReadByte();
                        this.EditorFolder = map.BR.ReadInt16();
                        break;
                }
            }