Example #1
0
        private void Apply(Created e)
        {
            Id = e.AggregateId;

            Name = new CustomerName(e.CustomerName);
            Address = new Address(e.Street, e.StreetNumber, e.PostalCode, e.City);
        }
Example #2
0
 public Logo(Sprite sprite)
 {
     Sprite  = sprite;
     Created = DateTime.UtcNow;
     Expires = Created.Add(LifeSpan);
 }
Example #3
0
 public override string ToString()
 {
     return($"#{CheckId} - {Created.ToString("dd.MM.yy hh:mm:ss")}");
 }
 public int CompareTo(Version other)
 {
     return(Created.CompareTo(other.Created));
 }
Example #5
0
 public CreatedPersonEvent(Created evnt)
 {
     this.PersonId = evnt.PersonId;
 }
Example #6
0
 /// <summary>
 /// Overrides this method if want to handle behavior when the application is launched.
 /// If base.OnCreated() is not called, the event 'Created' will not be emitted.
 /// </summary>
 /// <since_tizen> 3 </since_tizen>
 protected virtual void OnCreate()
 {
     Created?.Invoke(this, EventArgs.Empty);
 }
        /// <summary>验证数据,通过抛出异常的方式提示验证失败。</summary>
        /// <param name="isNew">是否插入</param>
        public override void Valid(Boolean isNew)
        {
            // 如果没有脏数据,则不需要进行任何处理
            if (!HasDirty)
            {
                return;
            }

            // 这里验证参数范围,建议抛出参数异常,指定参数名,前端用户界面可以捕获参数异常并聚焦到对应的参数输入框
            if (ClientId.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(ClientId), "ClientId不能为空!");
            }
            if (ProtocolType.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(ProtocolType), "ProtocolType不能为空!");
            }
            if (ClientName.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(ClientName), "ClientName不能为空!");
            }
            if (Description.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(Description), "Description不能为空!");
            }
            if (ClientUri.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(ClientUri), "ClientUri不能为空!");
            }
            if (LogoUri.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(LogoUri), "LogoUri不能为空!");
            }
            if (FrontChannelLogoutUri.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(FrontChannelLogoutUri), "FrontChannelLogoutUri不能为空!");
            }
            if (BackChannelLogoutUri.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(BackChannelLogoutUri), "BackChannelLogoutUri不能为空!");
            }
            if (ClientClaimsPrefix.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(ClientClaimsPrefix), "ClientClaimsPrefix不能为空!");
            }
            if (PairWiseSubjectSalt.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(PairWiseSubjectSalt), "PairWiseSubjectSalt不能为空!");
            }
            if (Created.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(Created), "Created不能为空!");
            }
            if (Updated.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(Updated), "Updated不能为空!");
            }
            if (LastAccessed.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(LastAccessed), "LastAccessed不能为空!");
            }
            if (UserCodeType.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(UserCodeType), "UserCodeType不能为空!");
            }

            // 在新插入数据或者修改了指定字段时进行修正

            // 检查唯一索引
            // CheckExist(isNew, __.ClientId);
        }
 public int CompareTo(CustomClass other)
 {
     return(Created.CompareTo(other.Created));
 }
Example #9
0
 public string GetCreatedStamp()
 {
     return(string.Format("Created by {0} on {1}", CreatedBy != null ? CreatedBy.FullName : "UNKNOWN", Created.ToString("yyyy-MM-dd")));
 }
 void OnCreated(Created @event)
 {
     Value = @event.Value;
 }
Example #11
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Media;

            if (dest == null)
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }

            base.CopyTo(dest);
            if (Identifier != null)
            {
                dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
            }
            if (BasedOn != null)
            {
                dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy());
            }
            if (PartOf != null)
            {
                dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy());
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.EventStatus>)StatusElement.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (Modality != null)
            {
                dest.Modality = (Hl7.Fhir.Model.CodeableConcept)Modality.DeepCopy();
            }
            if (View != null)
            {
                dest.View = (Hl7.Fhir.Model.CodeableConcept)View.DeepCopy();
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (Encounter != null)
            {
                dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy();
            }
            if (Created != null)
            {
                dest.Created = (Hl7.Fhir.Model.Element)Created.DeepCopy();
            }
            if (IssuedElement != null)
            {
                dest.IssuedElement = (Hl7.Fhir.Model.Instant)IssuedElement.DeepCopy();
            }
            if (Operator != null)
            {
                dest.Operator = (Hl7.Fhir.Model.ResourceReference)Operator.DeepCopy();
            }
            if (ReasonCode != null)
            {
                dest.ReasonCode = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonCode.DeepCopy());
            }
            if (BodySite != null)
            {
                dest.BodySite = (Hl7.Fhir.Model.CodeableConcept)BodySite.DeepCopy();
            }
            if (DeviceNameElement != null)
            {
                dest.DeviceNameElement = (Hl7.Fhir.Model.FhirString)DeviceNameElement.DeepCopy();
            }
            if (Device != null)
            {
                dest.Device = (Hl7.Fhir.Model.ResourceReference)Device.DeepCopy();
            }
            if (HeightElement != null)
            {
                dest.HeightElement = (Hl7.Fhir.Model.PositiveInt)HeightElement.DeepCopy();
            }
            if (WidthElement != null)
            {
                dest.WidthElement = (Hl7.Fhir.Model.PositiveInt)WidthElement.DeepCopy();
            }
            if (FramesElement != null)
            {
                dest.FramesElement = (Hl7.Fhir.Model.PositiveInt)FramesElement.DeepCopy();
            }
            if (DurationElement != null)
            {
                dest.DurationElement = (Hl7.Fhir.Model.FhirDecimal)DurationElement.DeepCopy();
            }
            if (Content != null)
            {
                dest.Content = (Hl7.Fhir.Model.Attachment)Content.DeepCopy();
            }
            if (Note != null)
            {
                dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
            }
            return(dest);
        }
Example #12
0
 public void Handle(MessageContext context, Created e)
 {
     // Dapper work... Insert into table
 }
        protected override bool HandleMessage(WidgetMessage message, Widget widget, IntPtr param1, IntPtr param2)
        {
            bool handled = false;

            switch (message)
            {
            case WidgetMessage.Create:
                Created?.Invoke(widget, param1 != default, ref handled);
                break;

            case WidgetMessage.Destroy:
                Destroyed?.Invoke(widget, param1 != default, ref handled);
                break;

            case WidgetMessage.Paint:
                Paint?.Invoke(widget, ref handled);
                break;

            case WidgetMessage.Draw:
                Draw?.Invoke(widget, ref handled);
                break;

            case WidgetMessage.KeyPress:
                KeyPressed?.Invoke(widget, ref AsRef <KeyState>(param1), ref handled);
                break;

            case WidgetMessage.KeyTakeFocus:
                TakingFocus?.Invoke(widget, param1 != default, ref handled);
                break;

            case WidgetMessage.KeyLoseFocus:
                LostFocus?.Invoke(widget, param1 != default, ref handled);
                break;

            case WidgetMessage.MouseDown:
                MouseDown?.Invoke(widget, ref AsRef <MouseState>(param1), ref handled);
                break;

            case WidgetMessage.MouseDrag:
                MouseDrag?.Invoke(widget, ref AsRef <MouseState>(param1), ref handled);
                break;

            case WidgetMessage.MouseUp:
                MouseUp?.Invoke(widget, ref AsRef <MouseState>(param1), ref handled);
                break;

            case WidgetMessage.Reshape:
                Reshape?.Invoke(widget, Widget.GetOrCreate(param1), ref AsRef <WidgetGeometryChange>(param2), ref handled);
                break;

            case WidgetMessage.ExposedChanged:
                ExposedChanged?.Invoke(widget, ref handled);
                break;

            case WidgetMessage.AcceptChild:
                ChildAdded?.Invoke(widget, Widget.GetOrCreate(param1), ref handled);
                break;

            case WidgetMessage.LoseChild:
                ChildRemoved?.Invoke(widget, Widget.GetOrCreate(param1), ref handled);
                break;

            case WidgetMessage.AcceptParent:
                ParentChanged?.Invoke(widget, param1 != default ? Widget.GetOrCreate(param1) : null, ref handled);
                break;

            case WidgetMessage.Shown:
                Shown?.Invoke(widget, Widget.GetOrCreate(param1), ref handled);
                break;

            case WidgetMessage.Hidden:
                Hidden?.Invoke(widget, Widget.GetOrCreate(param1), ref handled);
                break;

            case WidgetMessage.DescriptorChanged:
                DescriptorChanged?.Invoke(widget, ref handled);
                break;

            case WidgetMessage.PropertyChanged:
                PropertyChanged?.Invoke(widget, param1.ToInt32(), param2, ref handled);
                break;

            case WidgetMessage.MouseWheel:
                MouseWheel?.Invoke(widget, ref AsRef <MouseState>(param1), ref handled);
                break;

            case WidgetMessage.CursorAdjust:
                CursorAdjust?.Invoke(widget, ref AsRef <MouseState>(param1), ref AsRef <CursorStatus>(param2), ref handled);
                break;
            }
            return(handled);
        }
Example #14
0
        public bool Equals(MetadataEntity other)
        {
            //Check whether the compared object is null.
            if (Object.ReferenceEquals(other, null))
            {
                return(false);
            }

            //Check whether the compared object references the same data.
            if (Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            //Should be enough to compare equity
            return(Version.Equals(other.Version) && Name.Equals(other.Name) && StorName.Equals(other.StorName) && Extension.Equals(other.Extension) && BuisnessArea.Equals(other.BuisnessArea) && Metadata.Equals(other.Metadata) && Created.Equals(other.Created));
        }
Example #15
0
        protected virtual IntPtr WndProc(IntPtr hWnd, uint message, IntPtr wParam, IntPtr lParam)
        {
            WM msg = (WM)message;

            switch (msg)
            {
            case WM.HOTKEY:
            {
                if (wParam == (IntPtr)1)
                {
                    PostMessage(_handle, (uint)WM.CLOSE, IntPtr.Zero, IntPtr.Zero);
                    return(IntPtr.Zero);
                }
                break;
            }

            case WM.SYSKEYDOWN:
            {
                if (_options.KioskMode && (wParam == (IntPtr)Keyboard.VirtualKeyStates.VK_F4))
                {
                    return(IntPtr.Zero);
                }
                break;
            }

            case WM.CREATE:
            {
                NativeInstance = this;
                _handle        = hWnd;
                var createdEvent = new CreatedEventArgs(IntPtr.Zero, _handle, _handle);
                Created?.Invoke(this, createdEvent);
                _isInitialized = true;
                break;
            }

            case WM.ERASEBKGND:
                return(new IntPtr(1));

            case WM.NCHITTEST:
                if (_options.WindowFrameless)
                {
                    return((IntPtr)HT_CAPTION);
                }
                break;

            case WM.MOVING:
            case WM.MOVE:
            {
                Moving?.Invoke(this, new MovingEventArgs());
                return(IntPtr.Zero);
            }

            case WM.SIZE:
            {
                var size = GetClientSize();
                SizeChanged?.Invoke(this, new SizeChangedEventArgs(size.Width, size.Height));
                break;
            }

            case WM.CLOSE:
            {
                if (_handle != IntPtr.Zero && _isInitialized)
                {
                    Close?.Invoke(this, new CloseEventArgs());
                }
                PostQuitMessage(0);
                Environment.Exit(0);
                break;
            }
            }

            return(DefWindowProc(hWnd, message, wParam, lParam));
        }
Example #16
0
 public static Universe Create()
 {
     var change = new Created(Guid.NewGuid());
     return new Universe(change);
 }
 protected void Apply(Created evt)
 {
     Id = evt.Id;
 }
 public int CompareTime(Property b)
 {
     return(Created.CompareTo(b.Created));
 }
Example #19
0
 private void OnCreated(object sender, System.IO.FileSystemEventArgs e)
 {
     Created?.Invoke(sender, e);
 }
        public string GetTime()
        {
            string fmt = "G";

            return(Created.ToString(fmt));
        }
 protected void OnCreated(object sender, FileSystemEventArgs fileSystemEventArgs) => Created?.Invoke(sender, fileSystemEventArgs);
 protected void OnCreated(object sender, FileSystemEventArgs args)
 {
     Created?.Invoke(sender, args);
 }
Example #23
0
 public Task()
 {
     Id       = new Guid();
     Created  = DateTime.Now;
     TillDate = Created.AddDays(1);
 }
Example #24
0
 /* ----------------------------------------------------------------- */
 ///
 /// OnCreated
 ///
 /// <summary>
 /// Raises the Created event with the provided arguments.
 /// </summary>
 ///
 /// <param name="e">Arguments of the event being raised.</param>
 ///
 /* ----------------------------------------------------------------- */
 protected virtual void OnCreated(KeyValueEventArgs <TKey, TValue> e) =>
 Created?.Invoke(this, e);
Example #25
0
File: Planet.cs Project: L4fter/Orb
 public void Start()
 {
     Created?.Invoke(this);
 }
Example #26
0
 private void OnCreated(FileModel file)
 {
     Created?.Invoke(this, new ItemCreatedIventArgs <FileModel> {
         CreatedItem = file
     });
 }
 /* Methods */
 public INotification Create()
 {
     Created?.Invoke(_notification);
     return(_notification);
 }
Example #28
0
 public string GetCreatedTimestamp()
 {
     return(Created.ToFriendlyString());
 }
Example #29
0
 public void WriteXml(XmlWriter writer)
 {
     writer.WriteStartElement("autoqc_config");
     writer.WriteAttribute(ATTR.name, Name);
     writer.WriteAttributeIfString(ATTR.user, User);
     writer.WriteAttributeIfString(ATTR.created, Created.ToShortDateString() + " " + Created.ToShortTimeString());
     writer.WriteAttributeIfString(ATTR.modified, Modified.ToShortDateString() + " " + Modified.ToShortTimeString());
     MainSettings.WriteXml(writer);
     PanoramaSettings.WriteXml(writer);
     writer.WriteEndElement();
 }
Example #30
0
 protected virtual void OnCreated(FileSystemEventArgs e)
 {
     Created?.Invoke(this, e);
 }
Example #31
0
 private Universe(Created change)
     : base(change)
 {
     Id = change.NodeId;
 }
Example #32
0
        public void CreateLiveScreen(ICameraModel camera)
        {
            if (Created == null || SendMessage == null)
            {
                throw new NullReferenceException("Created or SendMessage is null");
            }
            Socket sock;
            string hostName   = "";
            Item   cameraItem = Configuration.Instance.GetItem(camera.Id);
            string token      = _loginSettings.Token;

            Debug.WriteLine("Camera Id: " + cameraItem.FQID.ToString());
            try
            {
                Item recoder = cameraItem.GetParent();
                hostName = recoder.Properties["Address"];
                int port = 80; // По умолчаю задаем 80 порт
                Int32.TryParse(recoder.Properties["Port"], out port);

                sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
                IPEndPoint ipe = new IPEndPoint(PrintScreenUtils.ToIpv4(hostName), port);
                sock.Connect(ipe);
            }
            catch (Exception e)
            {
                Debug.WriteLine("Не удалось открыть соединение: {0}", e.Message);
                SendMessage?.Invoke(CONNECTION_FAILED);
                return;
            }
            Progress?.Invoke(0.14f);

            //Строим запрос запрос в формате «Image Server API»
            string sendString = string.Format(
                "<?xml version=\"1.0\" encoding=\"utf-8\"?><methodcall><requestid>0</requestid>" +
                "<methodname>connect</methodname><username></username><password></password>" +
                "<cameraid>{0}</cameraid><alwaysstdjpeg>yes</alwaysstdjpeg>" +
                "<connectparam>id={1}&amp;connectiontoken={2}" +
                "</connectparam></methodcall>\r\n\r\n",
                cameraItem.FQID.ObjectId, cameraItem.FQID.ObjectId, token);

            // Конвертируем запрос в UTF 8 и отправляем его
            Byte[] bytesToSend = Encoding.UTF8.GetBytes(sendString);
            int    bs          = sock.Send(bytesToSend, bytesToSend.Length, 0); // bs -чисто отправленных байтов

            if (bs != bytesToSend.Length)
            {
                SendMessage(NO_CON_REQUEST);
                return;
            }
            Progress?.Invoke(0.28f);
            // Подготавливаемся к ответу
            int maxbuf = 1024 * 500; // Задаем размер буфера

            Byte[] bytesReceived = new Byte[maxbuf];
            int    bytes         = PrintScreenUtils.RecvUntilCrLfCrLf(sock, bytesReceived, 0, maxbuf);

            if (bytes == 0)
            {
                SendMessage?.Invoke(NO_CON_RESPONSE);
                return;
            }
            Progress?.Invoke(0.42f);
            string stringReceived = Encoding.UTF8.GetString(bytesReceived, 0, bytes);

            // Смотрим выполнилось соединение
            bool        authenticated = false;
            XmlDocument doc           = new XmlDocument();

            doc.LoadXml(stringReceived);
            XmlNodeList nodes = doc.GetElementsByTagName("connected");

            foreach (XmlNode node in nodes)
            {
                if (node.InnerText.ToLower() == "yes")
                {
                    authenticated = true;
                }
            }

            if (!authenticated)
            {
                SendMessage(AUTH_FAILED);
                return;
            }
            Progress?.Invoke(0.60f);
            // Cтроим запрос LIVE запрос
            sendString = string.Format("<?xml version=\"1.0\" encoding=\"utf-8\"?><methodcall><requestid>1</requestid>" +
                                       "<methodname>live</methodname>" +
                                       // "<sendinitialimage>no</sendinitialimage>" +
                                       "<compressionrate>80</compressionrate>" +
                                       "</methodcall>\r\n\r\n"
                                       );

            bytesToSend = Encoding.UTF8.GetBytes(sendString);
            bs          = sock.Send(bytesToSend, bytesToSend.Length, 0);
            if (bs != bytesToSend.Length)
            {
                SendMessage(NO_CREATE_IMG_REQUEST);
                return;
            }
            Progress?.Invoke(0.74f);
            int gotImage = 5;

            while (gotImage > 0)
            {
                gotImage--;
                bytes = PrintScreenUtils.RecvUntilCrLfCrLf(sock, bytesReceived, 0, maxbuf);
                if (bytes == 0)
                {
                    SendMessage(NO_CREATE_IMG_RESPONSE);
                    return;
                }

                stringReceived = Encoding.UTF8.GetString(bytesReceived, 0, bytes);
                Console.WriteLine(stringReceived);

                // Находим загловок изображения
                if (bytesReceived[0] != 'I')
                {
                    continue;
                }

                ImageInfo h            = PrintScreenUtils.ParseHeader(bytesReceived, 0, bytes);
                int       expectedSize = h.Length + 4;
                if (expectedSize > maxbuf)
                {
                    maxbuf        = expectedSize;
                    bytesReceived = new Byte[maxbuf];
                }

                bytes = PrintScreenUtils.RecvFixedLenth(sock, bytesReceived, 0, expectedSize);
                sock.Close();

                if (!(bytes == expectedSize || bytes == -expectedSize))
                {
                    SendMessage(UNCORRECT_RESPONSE_IMG);
                    return;
                }
                Progress?.Invoke(0.92f);

                int startJpegData  = -1;
                int lengthJpegData = -1;

                if (bytesReceived[0] == 0xFF && bytesReceived[1] == 0xD8)
                {
                    startJpegData  = 0;
                    lengthJpegData = h.Length;
                }
                else
                {
                    // There is a 36 bytes "Milestone Generic-Byte-Data" header in front of the JPEG
                    if (bytesReceived[36] == 0xFF && bytesReceived[37] == 0xD8)
                    {
                        startJpegData  = 36;
                        lengthJpegData = h.Length - 36;
                    }
                }

                if (startJpegData == -1)
                {
                    break;
                }
                Progress?.Invoke(1.0f);
                Byte[] jpeg = new Byte[lengthJpegData];
                Array.Copy(bytesReceived, startJpegData, jpeg, 0, lengthJpegData);
                Created?.Invoke(jpeg, "jpeg");
                return;
            }
            SendMessage?.Invoke("Не удалось получить изображение!");
        }
 public SampleAggregate(Guid id, Action<DomainEvent> inspector )
 {
     var evt = new Created(id);
     RaiseEvent(evt);
     inspector(evt);
 }
        /// <summary>
        /// Returns true if InventoryAssetFullTextAndPropertySearch instances are equal
        /// </summary>
        /// <param name="other">Instance of InventoryAssetFullTextAndPropertySearch to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(InventoryAssetFullTextAndPropertySearch other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     SearchString == other.SearchString ||
                     SearchString != null &&
                     SearchString.Equals(other.SearchString)
                     ) &&
                 (
                     InventoryOrderId == other.InventoryOrderId ||
                     InventoryOrderId != null &&
                     InventoryOrderId.Equals(other.InventoryOrderId)
                 ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ) &&
                 (
                     SortingColumn == other.SortingColumn ||
                     SortingColumn != null &&
                     SortingColumn.Equals(other.SortingColumn)
                 ) &&
                 (
                     TagId == other.TagId ||
                     TagId != null &&
                     TagId.Equals(other.TagId)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     AssetNumber == other.AssetNumber ||
                     AssetNumber != null &&
                     AssetNumber.Equals(other.AssetNumber)
                 ) &&
                 (
                     Latitude == other.Latitude ||
                     Latitude != null &&
                     Latitude.Equals(other.Latitude)
                 ) &&
                 (
                     Longitude == other.Longitude ||
                     Longitude != null &&
                     Longitude.Equals(other.Longitude)
                 ) &&
                 (
                     AssetClass == other.AssetClass ||
                     AssetClass != null &&
                     AssetClass.Equals(other.AssetClass)
                 ) &&
                 (
                     LastModified == other.LastModified ||
                     LastModified != null &&
                     LastModified.Equals(other.LastModified)
                 ) &&
                 (
                     Created == other.Created ||
                     Created != null &&
                     Created.Equals(other.Created)
                 ) &&
                 (
                     Creator == other.Creator ||
                     Creator != null &&
                     Creator.Equals(other.Creator)
                 ) &&
                 (
                     SubNumber == other.SubNumber ||
                     SubNumber != null &&
                     SubNumber.Equals(other.SubNumber)
                 ) &&
                 (
                     CompanyCode == other.CompanyCode ||
                     CompanyCode != null &&
                     CompanyCode.Equals(other.CompanyCode)
                 ) &&
                 (
                     InventoryNumber == other.InventoryNumber ||
                     InventoryNumber != null &&
                     InventoryNumber.Equals(other.InventoryNumber)
                 ) &&
                 (
                     SerialNumber == other.SerialNumber ||
                     SerialNumber != null &&
                     SerialNumber.Equals(other.SerialNumber)
                 ) &&
                 (
                     Location == other.Location ||
                     Location != null &&
                     Location.Equals(other.Location)
                 ) &&
                 (
                     Room == other.Room ||
                     Room != null &&
                     Room.Equals(other.Room)
                 ) &&
                 (
                     CostCenter == other.CostCenter ||
                     CostCenter != null &&
                     CostCenter.Equals(other.CostCenter)
                 ) &&
                 (
                     CapitalisationDate == other.CapitalisationDate ||
                     CapitalisationDate != null &&
                     CapitalisationDate.Equals(other.CapitalisationDate)
                 ) &&
                 (
                     LastInventoryDate == other.LastInventoryDate ||
                     LastInventoryDate != null &&
                     LastInventoryDate.Equals(other.LastInventoryDate)
                 ) &&
                 (
                     AcquisitionValue == other.AcquisitionValue ||
                     AcquisitionValue != null &&
                     AcquisitionValue.Equals(other.AcquisitionValue)
                 ) &&
                 (
                     AssetSuperNumber == other.AssetSuperNumber ||
                     AssetSuperNumber != null &&
                     AssetSuperNumber.Equals(other.AssetSuperNumber)
                 ) &&
                 (
                     Vendor == other.Vendor ||
                     Vendor != null &&
                     Vendor.Equals(other.Vendor)
                 ) &&
                 (
                     TypeName == other.TypeName ||
                     TypeName != null &&
                     TypeName.Equals(other.TypeName)
                 ) &&
                 (
                     Plant == other.Plant ||
                     Plant != null &&
                     Plant.Equals(other.Plant)
                 ) &&
                 (
                     Quantity == other.Quantity ||
                     Quantity != null &&
                     Quantity.Equals(other.Quantity)
                 ) &&
                 (
                     Unit == other.Unit ||
                     Unit != null &&
                     Unit.Equals(other.Unit)
                 ) &&
                 (
                     Untaggable == other.Untaggable ||
                     Untaggable != null &&
                     Untaggable.Equals(other.Untaggable)
                 ) &&
                 (
                     Untagged == other.Untagged ||
                     Untagged != null &&
                     Untagged.Equals(other.Untagged)
                 ) &&
                 (
                     Page == other.Page ||
                     Page != null &&
                     Page.Equals(other.Page)
                 ) &&
                 (
                     PageSize == other.PageSize ||
                     PageSize != null &&
                     PageSize.Equals(other.PageSize)
                 ));
        }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (SearchString != null)
         {
             hashCode = hashCode * 59 + SearchString.GetHashCode();
         }
         if (InventoryOrderId != null)
         {
             hashCode = hashCode * 59 + InventoryOrderId.GetHashCode();
         }
         if (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         if (SortingColumn != null)
         {
             hashCode = hashCode * 59 + SortingColumn.GetHashCode();
         }
         if (TagId != null)
         {
             hashCode = hashCode * 59 + TagId.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (AssetNumber != null)
         {
             hashCode = hashCode * 59 + AssetNumber.GetHashCode();
         }
         if (Latitude != null)
         {
             hashCode = hashCode * 59 + Latitude.GetHashCode();
         }
         if (Longitude != null)
         {
             hashCode = hashCode * 59 + Longitude.GetHashCode();
         }
         if (AssetClass != null)
         {
             hashCode = hashCode * 59 + AssetClass.GetHashCode();
         }
         if (LastModified != null)
         {
             hashCode = hashCode * 59 + LastModified.GetHashCode();
         }
         if (Created != null)
         {
             hashCode = hashCode * 59 + Created.GetHashCode();
         }
         if (Creator != null)
         {
             hashCode = hashCode * 59 + Creator.GetHashCode();
         }
         if (SubNumber != null)
         {
             hashCode = hashCode * 59 + SubNumber.GetHashCode();
         }
         if (CompanyCode != null)
         {
             hashCode = hashCode * 59 + CompanyCode.GetHashCode();
         }
         if (InventoryNumber != null)
         {
             hashCode = hashCode * 59 + InventoryNumber.GetHashCode();
         }
         if (SerialNumber != null)
         {
             hashCode = hashCode * 59 + SerialNumber.GetHashCode();
         }
         if (Location != null)
         {
             hashCode = hashCode * 59 + Location.GetHashCode();
         }
         if (Room != null)
         {
             hashCode = hashCode * 59 + Room.GetHashCode();
         }
         if (CostCenter != null)
         {
             hashCode = hashCode * 59 + CostCenter.GetHashCode();
         }
         if (CapitalisationDate != null)
         {
             hashCode = hashCode * 59 + CapitalisationDate.GetHashCode();
         }
         if (LastInventoryDate != null)
         {
             hashCode = hashCode * 59 + LastInventoryDate.GetHashCode();
         }
         if (AcquisitionValue != null)
         {
             hashCode = hashCode * 59 + AcquisitionValue.GetHashCode();
         }
         if (AssetSuperNumber != null)
         {
             hashCode = hashCode * 59 + AssetSuperNumber.GetHashCode();
         }
         if (Vendor != null)
         {
             hashCode = hashCode * 59 + Vendor.GetHashCode();
         }
         if (TypeName != null)
         {
             hashCode = hashCode * 59 + TypeName.GetHashCode();
         }
         if (Plant != null)
         {
             hashCode = hashCode * 59 + Plant.GetHashCode();
         }
         if (Quantity != null)
         {
             hashCode = hashCode * 59 + Quantity.GetHashCode();
         }
         if (Unit != null)
         {
             hashCode = hashCode * 59 + Unit.GetHashCode();
         }
         if (Untaggable != null)
         {
             hashCode = hashCode * 59 + Untaggable.GetHashCode();
         }
         if (Untagged != null)
         {
             hashCode = hashCode * 59 + Untagged.GetHashCode();
         }
         if (Page != null)
         {
             hashCode = hashCode * 59 + Page.GetHashCode();
         }
         if (PageSize != null)
         {
             hashCode = hashCode * 59 + PageSize.GetHashCode();
         }
         return(hashCode);
     }
 }
      void Apply(Created e) {
        entity_ = new AggregateEntity();

        AddEntity(entity_);
        id_ = e.ID;
      }