Beispiel #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Parent.Length != 0)
            {
                hash ^= Parent.GetHashCode();
            }
            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (State != global::Google.Cloud.SecurityCenter.V1.Finding.Types.State.Unspecified)
            {
                hash ^= State.GetHashCode();
            }
            if (Category.Length != 0)
            {
                hash ^= Category.GetHashCode();
            }
            if (ExternalUri.Length != 0)
            {
                hash ^= ExternalUri.GetHashCode();
            }
            hash ^= SourceProperties.GetHashCode();
            if (securityMarks_ != null)
            {
                hash ^= SecurityMarks.GetHashCode();
            }
            if (eventTime_ != null)
            {
                hash ^= EventTime.GetHashCode();
            }
            if (createTime_ != null)
            {
                hash ^= CreateTime.GetHashCode();
            }
            if (Severity != global::Google.Cloud.SecurityCenter.V1.Finding.Types.Severity.Unspecified)
            {
                hash ^= Severity.GetHashCode();
            }
            if (CanonicalName.Length != 0)
            {
                hash ^= CanonicalName.GetHashCode();
            }
            if (FindingClass != global::Google.Cloud.SecurityCenter.V1.Finding.Types.FindingClass.Unspecified)
            {
                hash ^= FindingClass.GetHashCode();
            }
            if (indicator_ != null)
            {
                hash ^= Indicator.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Beispiel #2
0
 public void MergeFrom(Finding other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.Parent.Length != 0)
     {
         Parent = other.Parent;
     }
     if (other.ResourceName.Length != 0)
     {
         ResourceName = other.ResourceName;
     }
     if (other.State != global::Google.Cloud.SecurityCenter.V1.Finding.Types.State.Unspecified)
     {
         State = other.State;
     }
     if (other.Category.Length != 0)
     {
         Category = other.Category;
     }
     if (other.ExternalUri.Length != 0)
     {
         ExternalUri = other.ExternalUri;
     }
     sourceProperties_.Add(other.sourceProperties_);
     if (other.securityMarks_ != null)
     {
         if (securityMarks_ == null)
         {
             SecurityMarks = new global::Google.Cloud.SecurityCenter.V1.SecurityMarks();
         }
         SecurityMarks.MergeFrom(other.SecurityMarks);
     }
     if (other.eventTime_ != null)
     {
         if (eventTime_ == null)
         {
             EventTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         EventTime.MergeFrom(other.EventTime);
     }
     if (other.createTime_ != null)
     {
         if (createTime_ == null)
         {
             CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreateTime.MergeFrom(other.CreateTime);
     }
     if (other.Severity != global::Google.Cloud.SecurityCenter.V1.Finding.Types.Severity.Unspecified)
     {
         Severity = other.Severity;
     }
     if (other.CanonicalName.Length != 0)
     {
         CanonicalName = other.CanonicalName;
     }
     if (other.FindingClass != global::Google.Cloud.SecurityCenter.V1.Finding.Types.FindingClass.Unspecified)
     {
         FindingClass = other.FindingClass;
     }
     if (other.indicator_ != null)
     {
         if (indicator_ == null)
         {
             Indicator = new global::Google.Cloud.SecurityCenter.V1.Indicator();
         }
         Indicator.MergeFrom(other.Indicator);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
 public void MergeFrom(HyperparameterTuningJob other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.DisplayName.Length != 0)
     {
         DisplayName = other.DisplayName;
     }
     if (other.studySpec_ != null)
     {
         if (studySpec_ == null)
         {
             StudySpec = new global::Google.Cloud.AIPlatform.V1.StudySpec();
         }
         StudySpec.MergeFrom(other.StudySpec);
     }
     if (other.MaxTrialCount != 0)
     {
         MaxTrialCount = other.MaxTrialCount;
     }
     if (other.ParallelTrialCount != 0)
     {
         ParallelTrialCount = other.ParallelTrialCount;
     }
     if (other.MaxFailedTrialCount != 0)
     {
         MaxFailedTrialCount = other.MaxFailedTrialCount;
     }
     if (other.trialJobSpec_ != null)
     {
         if (trialJobSpec_ == null)
         {
             TrialJobSpec = new global::Google.Cloud.AIPlatform.V1.CustomJobSpec();
         }
         TrialJobSpec.MergeFrom(other.TrialJobSpec);
     }
     trials_.Add(other.trials_);
     if (other.State != global::Google.Cloud.AIPlatform.V1.JobState.Unspecified)
     {
         State = other.State;
     }
     if (other.createTime_ != null)
     {
         if (createTime_ == null)
         {
             CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreateTime.MergeFrom(other.CreateTime);
     }
     if (other.startTime_ != null)
     {
         if (startTime_ == null)
         {
             StartTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         StartTime.MergeFrom(other.StartTime);
     }
     if (other.endTime_ != null)
     {
         if (endTime_ == null)
         {
             EndTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         EndTime.MergeFrom(other.EndTime);
     }
     if (other.updateTime_ != null)
     {
         if (updateTime_ == null)
         {
             UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         UpdateTime.MergeFrom(other.UpdateTime);
     }
     if (other.error_ != null)
     {
         if (error_ == null)
         {
             Error = new global::Google.Rpc.Status();
         }
         Error.MergeFrom(other.Error);
     }
     labels_.Add(other.labels_);
     if (other.encryptionSpec_ != null)
     {
         if (encryptionSpec_ == null)
         {
             EncryptionSpec = new global::Google.Cloud.AIPlatform.V1.EncryptionSpec();
         }
         EncryptionSpec.MergeFrom(other.EncryptionSpec);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
        public virtual string Format()
        {
            var sb = new StringBuilder();

            sb.Append(CreateTime.ToString(_dateTimeFormat));

            if (LibraryName != null)
            {
                sb.AppendFormat(" [{0}]", LibraryName);
            }

            if (Message != null)
            {
                if (Message.Contains('\n'))
                {
                    sb.AppendLine()
                    .AppendLine("Message:")
                    .Append(Message.BlockIndent("   "));
                }
                else
                {
                    sb.AppendLine()
                    .Append("Message: ")
                    .Append(Message);
                }
            }

            sb.AppendLine()
            .Append("Call Site: ")
            .Append(CallerFilePath)
            .Append(':')
            .Append(CallerMemberName)
            .Append('(')
            .Append(CallerLineNumber)
            .Append(')');

            if (Exception != null)
            {
                sb.AppendLine()
                .AppendLine("Exception:")
                .Append(Exception.FormatToString().BlockIndent("   "));
            }

            if (AdditionalInformation != null)
            {
                if (AdditionalInformation.Contains('\n'))
                {
                    sb.AppendLine()
                    .AppendLine("Additional Information:")
                    .Append(AdditionalInformation.BlockIndent("   "));
                }
                else
                {
                    sb.AppendLine()
                    .Append("Additional Information: ")
                    .Append(AdditionalInformation);
                }
            }

            return(sb.ToString());
        }
 public void InitParam()
 {
     Id           = Guid.NewGuid();
     CreateTime   = DateTime.Now;
     CreateDayInt = int.Parse(CreateTime.ToString("yyyyMMdd"));
 }
 public void MergeFrom(Application other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.ExternalId.Length != 0)
     {
         ExternalId = other.ExternalId;
     }
     if (other.Profile.Length != 0)
     {
         Profile = other.Profile;
     }
     if (other.Job.Length != 0)
     {
         Job = other.Job;
     }
     if (other.Company.Length != 0)
     {
         Company = other.Company;
     }
     if (other.applicationDate_ != null)
     {
         if (applicationDate_ == null)
         {
             applicationDate_ = new global::Google.Type.Date();
         }
         ApplicationDate.MergeFrom(other.ApplicationDate);
     }
     if (other.Stage != 0)
     {
         Stage = other.Stage;
     }
     if (other.State != 0)
     {
         State = other.State;
     }
     interviews_.Add(other.interviews_);
     if (other.referral_ != null)
     {
         if (referral_ == null || other.Referral != false)
         {
             Referral = other.Referral;
         }
     }
     if (other.createTime_ != null)
     {
         if (createTime_ == null)
         {
             createTime_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreateTime.MergeFrom(other.CreateTime);
     }
     if (other.updateTime_ != null)
     {
         if (updateTime_ == null)
         {
             updateTime_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         UpdateTime.MergeFrom(other.UpdateTime);
     }
     if (other.OutcomeNotes.Length != 0)
     {
         OutcomeNotes = other.OutcomeNotes;
     }
     if (other.Outcome != 0)
     {
         Outcome = other.Outcome;
     }
     if (other.isMatch_ != null)
     {
         if (isMatch_ == null || other.IsMatch != false)
         {
             IsMatch = other.IsMatch;
         }
     }
     if (other.JobTitleSnippet.Length != 0)
     {
         JobTitleSnippet = other.JobTitleSnippet;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
 /// <summary>
 /// Kod mieszania
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     return(RefueledCar != null?RefueledCar.GetHashCode() ^ CreateTime.GetHashCode() : 0);
 }
        /// <summary>
        /// Send Order To Vend
        /// </summary>
        /// <param name="db"></param>
        /// <returns></returns>
        public async Task <bool> SendToVend()
        {
            try
            {
                //var tmpOrder = JsonConvert.DeserializeObject<Order>(JsonString);
                //var tmpStall = Models.Stall.FindById(StallId, db);
                //create vend api object
                var vendSale = new VendRegisterSaleRequest();
                vendSale.InvoiceNumber = Id.ToString();
                vendSale.RegisterId    = Stall.RegisterId;
                vendSale.SaleDate      = CreateTime.ToUniversalTime().ToString("yyyy-MM-dd HH:mm:ss");
                vendSale.Status        = OrderStatus.CLOSED;
                vendSale.TotalPrice    = (double)CalcTotalPriceExcludeTax();
                vendSale.TotalTax      = (double)CalcTotalTax();
                //vendSale.TaxName = Items[0].Product.TaxName;
                vendSale.RegisterSaleProducts = new List <VendRegisterSaleRequest.RegisterSaleProduct>();
                vendSale.RegisterSalePayments = new List <VendRegisterSaleRequest.RegisterSalePayment>();
                vendSale.Note = string.Format("#{0}@{1}\n{2}\n{3}\n{4}", Id, PaymentId, Receiver, DeliveryAddress, Note);
                foreach (var item in Items)
                {
                    var salePdt = new VendRegisterSaleRequest.RegisterSaleProduct()
                    {
                        ProductId = item.ProductId,
                        Quantity  = item.Quantity,
                        Price     = (double)item.Price,
                        Tax       = (double)item.Tax,
                        TaxId     = item.TaxId,
                        TaxTotal  = (double)item.Tax
                    };

                    salePdt.Attributes.Add(new VendRegisterSaleRequest.Attribute()
                    {
                        Name  = "line_note",
                        Value = item.LineNote
                    });

                    vendSale.RegisterSaleProducts.Add(salePdt);
                }

                vendSale.RegisterSalePayments.Add(new VendRegisterSaleRequest.RegisterSalePayment()
                {
                    RetailerPaymentTypeId = Stall.PaymentTypeId,
                    PaymentDate           = string.Format("{0:yyyy-MM-dd HH:mm:ss}", Payment.ResponseTime?.ToUniversalTime()),
                    Amount = (double)StallAmount
                });

                //do reqeust
                var response = await VendRegisterSale.CreateVendRegisterSalesAsync(vendSale, Stall.Prefix, await StallApplication.GetAccessTokenAsync(Stall.Prefix));

                //update
                if (!string.IsNullOrEmpty(response.RegisterSale.Id) && OrderStatus.CLOSED.Equals(response.RegisterSale.Status))
                {
                    VendResponse = JsonConvert.SerializeObject(response);
                    VendSaleId   = response?.RegisterSale?.Id;
                    return(true);
                }
                else
                {
                    StallApplication.SysError("[MSG]fail to save to vend");
                    return(false);
                }
            }
            catch (Exception ex)
            {
                StallApplication.SysError("[MSG]fail to save to vend", ex);
                return(false);
            }
        }
Beispiel #9
0
        public override string ToString()
        {
            string template = "状态:{0} 标题:{1} 网址:{2} 创建时间:{3} 引用页:{4} 注释:{5}";

            return(string.Format(template, Status.ToString(), Title, Url, CreateTime.ToShortDateString(), SourceUrl, Comment));
        }
Beispiel #10
0
        public void WriteXml(System.Xml.XmlWriter writer)
        {
            var s = new XmlSerializer(typeof(string));
            var b = new XmlSerializer(typeof(bool));
            var l = new XmlSerializer(typeof(List <AutoAnswer>));

            writer.WriteStartElement("TaskInfo");

            //taskid
            writer.WriteStartElement("TaskId");
            s.Serialize(writer, TaskId.ToString());
            writer.WriteEndElement();

            //pluginname
            writer.WriteStartElement("PluginName");
            s.Serialize(writer, PluginName);
            writer.WriteEndElement();

            //url
            writer.WriteStartElement("Url");
            s.Serialize(writer, Url);
            writer.WriteEndElement();

            //title
            writer.WriteStartElement("Title");
            s.Serialize(writer, Title);
            writer.WriteEndElement();

            //status
            writer.WriteStartElement("Status");
            DownloadStatus tmpds = Status;

            if (tmpds == DownloadStatus.正在下载 || tmpds == DownloadStatus.正在停止 || tmpds == DownloadStatus.等待开始)
            {
                tmpds = DownloadStatus.已经停止;
            }
            s.Serialize(writer, tmpds.ToString());
            writer.WriteEndElement();

            //createtime
            writer.WriteStartElement("CreateTime");
            s.Serialize(writer, CreateTime.ToString());
            writer.WriteEndElement();

            //finishtime
            if (FinishTime != null)
            {
                writer.WriteStartElement("FinishTime");
                s.Serialize(writer, FinishTime.ToString());
                writer.WriteEndElement();
            }

            //savedirectory
            writer.WriteStartElement("SaveDirectory");
            s.Serialize(writer, SaveDirectory.ToString());
            writer.WriteEndElement();

            //PartCount
            writer.WriteStartElement("PartCount");
            s.Serialize(writer, PartCount.ToString());
            writer.WriteEndElement();

            //CurrentPart
            writer.WriteStartElement("CurrentPart");
            s.Serialize(writer, CurrentPart.ToString());
            writer.WriteEndElement();

            //is be added
            writer.WriteStartElement("IsBeAdded");
            b.Serialize(writer, IsBeAdded);
            writer.WriteEndElement();

            //partialfinished
            writer.WriteStartElement("PartialFinished");
            b.Serialize(writer, PartialFinished);
            writer.WriteEndElement();

            //partialfinished detail
            writer.WriteStartElement("PartialFinishedDetail");
            s.Serialize(writer, PartialFinishedDetail);
            writer.WriteEndElement();

            //autoanswer
            writer.WriteStartElement("AutoAnswers");
            l.Serialize(writer, AutoAnswer);
            writer.WriteEndElement();

            //extract cache
            writer.WriteStartElement("ExtractCache");
            b.Serialize(writer, ExtractCache);
            writer.WriteEndElement();

            //FilePath
            writer.WriteStartElement("Files");
            foreach (string item in FilePath)
            {
                writer.WriteStartElement("File");
                s.Serialize(writer, item);
                writer.WriteEndElement();
            }
            writer.WriteEndElement();

            //SubFilePath
            writer.WriteStartElement("SubFiles");
            foreach (string item in SubFilePath)
            {
                writer.WriteStartElement("SubFile");
                s.Serialize(writer, item);
                writer.WriteEndElement();
            }
            writer.WriteEndElement();

            //DownSub
            writer.WriteStartElement("DownSub");
            s.Serialize(writer, DownSub.ToString());
            writer.WriteEndElement();

            //proxy
            XmlSerializer sProxy = new XmlSerializer(typeof(AcDownProxy));

            writer.WriteStartElement("Proxy");
            sProxy.Serialize(writer, new AcDownProxy().FromWebProxy(Proxy));
            writer.WriteEndElement();

            //source url
            writer.WriteStartElement("SourceUrl");
            s.Serialize(writer, SourceUrl);
            writer.WriteEndElement();

            //comment
            writer.WriteStartElement("Comment");
            s.Serialize(writer, Comment);
            writer.WriteEndElement();

            //hash
            writer.WriteStartElement("Hash");
            s.Serialize(writer, Hash);
            writer.WriteEndElement();

            //Progress
            writer.WriteStartElement("Progress");
            s.Serialize(writer, GetProgress().ToString());
            writer.WriteEndElement();

            //settings
            XmlSerializer sSettings = new XmlSerializer(typeof(SerializableDictionary <string, string>));

            writer.WriteStartElement("Settings");
            sSettings.Serialize(writer, Settings);
            writer.WriteEndElement();

            writer.WriteEndElement();
        }
Beispiel #11
0
 public Token(string userID, int validHours)
 {
     UserID     = userID;
     CreateTime = DateTime.Now;
     ExpireTime = CreateTime.AddHours(validHours);
 }
Beispiel #12
0
 /// <summary>
 /// 用作特定类型的哈希函数。
 /// </summary>
 /// <returns>
 /// 当前 <see cref="T:System.Object"/> 的哈希代码。
 /// </returns>
 public override int GetHashCode()
 {
     return(Id.GetHashCode() ^ CreateTime.GetHashCode());
 }
Beispiel #13
0
 public void MergeFrom(Customer other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.OrgDisplayName.Length != 0)
     {
         OrgDisplayName = other.OrgDisplayName;
     }
     if (other.orgPostalAddress_ != null)
     {
         if (orgPostalAddress_ == null)
         {
             OrgPostalAddress = new global::Google.Type.PostalAddress();
         }
         OrgPostalAddress.MergeFrom(other.OrgPostalAddress);
     }
     if (other.primaryContactInfo_ != null)
     {
         if (primaryContactInfo_ == null)
         {
             PrimaryContactInfo = new global::Google.Cloud.Channel.V1.ContactInfo();
         }
         PrimaryContactInfo.MergeFrom(other.PrimaryContactInfo);
     }
     if (other.AlternateEmail.Length != 0)
     {
         AlternateEmail = other.AlternateEmail;
     }
     if (other.Domain.Length != 0)
     {
         Domain = other.Domain;
     }
     if (other.createTime_ != null)
     {
         if (createTime_ == null)
         {
             CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreateTime.MergeFrom(other.CreateTime);
     }
     if (other.updateTime_ != null)
     {
         if (updateTime_ == null)
         {
             UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         UpdateTime.MergeFrom(other.UpdateTime);
     }
     if (other.CloudIdentityId.Length != 0)
     {
         CloudIdentityId = other.CloudIdentityId;
     }
     if (other.LanguageCode.Length != 0)
     {
         LanguageCode = other.LanguageCode;
     }
     if (other.cloudIdentityInfo_ != null)
     {
         if (cloudIdentityInfo_ == null)
         {
             CloudIdentityInfo = new global::Google.Cloud.Channel.V1.CloudIdentityInfo();
         }
         CloudIdentityInfo.MergeFrom(other.CloudIdentityInfo);
     }
     if (other.ChannelPartnerId.Length != 0)
     {
         ChannelPartnerId = other.ChannelPartnerId;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Beispiel #14
0
        /// <summary>
        /// 读取结构
        /// </summary>
        /// <param name="buffer"></param>
        /// <param name="starIndex"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        private bool GetValueText(byte[] buffer, ref int starIndex, string key)
        {
            switch (key)
            {
            case "ANNOUNCE":
                Announce = GetKeyText(buffer, ref starIndex).ToString();
                break;

            case "ANNOUNCE-LIST":
                int       listCount = 0;
                ArrayList _tempList = GetKeyData(buffer, ref starIndex, ref listCount);
                for (int i = 0; i != _tempList.Count; i++)
                {
                    AnnounceList.Add(_tempList[i].ToString());
                }
                break;

            case "CREATION DATE":
                object date = GetKeyNumb(buffer, ref starIndex).ToString();
                if (date == null)
                {
                    if (OpenError.Length == 0)
                    {
                        OpenError = "CREATION DATE 返回不是数字类型";
                    }
                    return(false);
                }
                CreateTime = CreateTime.AddTicks(long.Parse(date.ToString()));
                break;

            case "CODEPAGE":
                object codePageNumb = GetKeyNumb(buffer, ref starIndex);
                if (codePageNumb == null)
                {
                    if (OpenError.Length == 0)
                    {
                        OpenError = "CODEPAGE 返回不是数字类型";
                    }
                    return(false);
                }
                CodePage = long.Parse(codePageNumb.ToString());
                break;

            case "ENCODING":
                Encoding = GetKeyText(buffer, ref starIndex).ToString();
                break;

            case "CREATED BY":
                CreatedBy = GetKeyText(buffer, ref starIndex).ToString();
                break;

            case "COMMENT":
                Comment = GetKeyText(buffer, ref starIndex).ToString();
                break;

            case "COMMENT.UTF-8":
                CommentUTF8 = GetKeyText(buffer, ref starIndex).ToString();
                break;

            case "INFO":
                int fileListCount = 0;
                GetFileInfo(buffer, ref starIndex, ref fileListCount);
                break;

            case "NAME":
                Name = GetKeyText(buffer, ref starIndex).ToString();
                break;

            case "NAME.UTF-8":
                NameUTF8 = GetKeyText(buffer, ref starIndex).ToString();
                break;

            case "PIECE LENGTH":
                object pieceLengthNumb = GetKeyNumb(buffer, ref starIndex);
                if (pieceLengthNumb == null)
                {
                    if (OpenError.Length == 0)
                    {
                        OpenError = "PIECE LENGTH 返回不是数字类型";
                    }
                    return(false);
                }
                PieceLength = long.Parse(pieceLengthNumb.ToString());
                break;

            case "PIECES":
                Pieces = GetKeyByte(buffer, ref starIndex);
                break;

            case "PUBLISHER":
                Publisher = GetKeyText(buffer, ref starIndex).ToString();
                break;

            case "PUBLISHER.UTF-8":
                PublisherUTF8 = GetKeyText(buffer, ref starIndex).ToString();
                break;

            case "PUBLISHER-URL":
                PublisherUrl = GetKeyText(buffer, ref starIndex).ToString();
                break;

            case "PUBLISHER-URL.UTF-8":
                PublisherUrlUTF8 = GetKeyText(buffer, ref starIndex).ToString();
                break;

            case "NODES":
                int       nodesCount = 0;
                ArrayList _nodesList = GetKeyData(buffer, ref starIndex, ref nodesCount);
                int       ipCount    = _nodesList.Count / 2;
                for (int i = 0; i != ipCount; i++)
                {
                    Notes.Add(_nodesList[i * 2] + ":" + _nodesList[(i * 2) + 1]);
                }
                break;

            default:
                return(false);
            }
            return(true);
        }
 /// <summary>
 /// Porównywarka
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public bool Equals(Refueling other)
 {
     return(RefueledCar.Equals(other.RefueledCar) && CreateTime.Equals(other.CreateTime));
 }
Beispiel #16
0
        public void MergeFrom(ModelEvaluation other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Name.Length != 0)
            {
                Name = other.Name;
            }
            if (other.AnnotationSpecId.Length != 0)
            {
                AnnotationSpecId = other.AnnotationSpecId;
            }
            if (other.DisplayName.Length != 0)
            {
                DisplayName = other.DisplayName;
            }
            if (other.createTime_ != null)
            {
                if (createTime_ == null)
                {
                    CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                }
                CreateTime.MergeFrom(other.CreateTime);
            }
            if (other.EvaluatedExampleCount != 0)
            {
                EvaluatedExampleCount = other.EvaluatedExampleCount;
            }
            switch (other.MetricsCase)
            {
            case MetricsOneofCase.ClassificationEvaluationMetrics:
                if (ClassificationEvaluationMetrics == null)
                {
                    ClassificationEvaluationMetrics = new global::Google.Cloud.AutoML.V1.ClassificationEvaluationMetrics();
                }
                ClassificationEvaluationMetrics.MergeFrom(other.ClassificationEvaluationMetrics);
                break;

            case MetricsOneofCase.TranslationEvaluationMetrics:
                if (TranslationEvaluationMetrics == null)
                {
                    TranslationEvaluationMetrics = new global::Google.Cloud.AutoML.V1.TranslationEvaluationMetrics();
                }
                TranslationEvaluationMetrics.MergeFrom(other.TranslationEvaluationMetrics);
                break;

            case MetricsOneofCase.ImageObjectDetectionEvaluationMetrics:
                if (ImageObjectDetectionEvaluationMetrics == null)
                {
                    ImageObjectDetectionEvaluationMetrics = new global::Google.Cloud.AutoML.V1.ImageObjectDetectionEvaluationMetrics();
                }
                ImageObjectDetectionEvaluationMetrics.MergeFrom(other.ImageObjectDetectionEvaluationMetrics);
                break;

            case MetricsOneofCase.TextSentimentEvaluationMetrics:
                if (TextSentimentEvaluationMetrics == null)
                {
                    TextSentimentEvaluationMetrics = new global::Google.Cloud.AutoML.V1.TextSentimentEvaluationMetrics();
                }
                TextSentimentEvaluationMetrics.MergeFrom(other.TextSentimentEvaluationMetrics);
                break;

            case MetricsOneofCase.TextExtractionEvaluationMetrics:
                if (TextExtractionEvaluationMetrics == null)
                {
                    TextExtractionEvaluationMetrics = new global::Google.Cloud.AutoML.V1.TextExtractionEvaluationMetrics();
                }
                TextExtractionEvaluationMetrics.MergeFrom(other.TextExtractionEvaluationMetrics);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Beispiel #17
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (modelMetadataCase_ == ModelMetadataOneofCase.TranslationModelMetadata)
            {
                hash ^= TranslationModelMetadata.GetHashCode();
            }
            if (modelMetadataCase_ == ModelMetadataOneofCase.ImageClassificationModelMetadata)
            {
                hash ^= ImageClassificationModelMetadata.GetHashCode();
            }
            if (modelMetadataCase_ == ModelMetadataOneofCase.TextClassificationModelMetadata)
            {
                hash ^= TextClassificationModelMetadata.GetHashCode();
            }
            if (modelMetadataCase_ == ModelMetadataOneofCase.ImageObjectDetectionModelMetadata)
            {
                hash ^= ImageObjectDetectionModelMetadata.GetHashCode();
            }
            if (modelMetadataCase_ == ModelMetadataOneofCase.TextExtractionModelMetadata)
            {
                hash ^= TextExtractionModelMetadata.GetHashCode();
            }
            if (modelMetadataCase_ == ModelMetadataOneofCase.TextSentimentModelMetadata)
            {
                hash ^= TextSentimentModelMetadata.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (DisplayName.Length != 0)
            {
                hash ^= DisplayName.GetHashCode();
            }
            if (DatasetId.Length != 0)
            {
                hash ^= DatasetId.GetHashCode();
            }
            if (createTime_ != null)
            {
                hash ^= CreateTime.GetHashCode();
            }
            if (updateTime_ != null)
            {
                hash ^= UpdateTime.GetHashCode();
            }
            if (DeploymentState != 0)
            {
                hash ^= DeploymentState.GetHashCode();
            }
            if (Etag.Length != 0)
            {
                hash ^= Etag.GetHashCode();
            }
            hash ^= Labels.GetHashCode();
            hash ^= (int)modelMetadataCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Beispiel #18
0
        public void MergeFrom(Task other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Name.Length != 0)
            {
                Name = other.Name;
            }
            if (other.scheduleTime_ != null)
            {
                if (scheduleTime_ == null)
                {
                    scheduleTime_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                }
                ScheduleTime.MergeFrom(other.ScheduleTime);
            }
            if (other.createTime_ != null)
            {
                if (createTime_ == null)
                {
                    createTime_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                }
                CreateTime.MergeFrom(other.CreateTime);
            }
            if (other.dispatchDeadline_ != null)
            {
                if (dispatchDeadline_ == null)
                {
                    dispatchDeadline_ = new global::Google.Protobuf.WellKnownTypes.Duration();
                }
                DispatchDeadline.MergeFrom(other.DispatchDeadline);
            }
            if (other.DispatchCount != 0)
            {
                DispatchCount = other.DispatchCount;
            }
            if (other.ResponseCount != 0)
            {
                ResponseCount = other.ResponseCount;
            }
            if (other.firstAttempt_ != null)
            {
                if (firstAttempt_ == null)
                {
                    firstAttempt_ = new global::Google.Cloud.Tasks.V2Beta3.Attempt();
                }
                FirstAttempt.MergeFrom(other.FirstAttempt);
            }
            if (other.lastAttempt_ != null)
            {
                if (lastAttempt_ == null)
                {
                    lastAttempt_ = new global::Google.Cloud.Tasks.V2Beta3.Attempt();
                }
                LastAttempt.MergeFrom(other.LastAttempt);
            }
            if (other.View != 0)
            {
                View = other.View;
            }
            switch (other.PayloadTypeCase)
            {
            case PayloadTypeOneofCase.AppEngineHttpRequest:
                if (AppEngineHttpRequest == null)
                {
                    AppEngineHttpRequest = new global::Google.Cloud.Tasks.V2Beta3.AppEngineHttpRequest();
                }
                AppEngineHttpRequest.MergeFrom(other.AppEngineHttpRequest);
                break;

            case PayloadTypeOneofCase.HttpRequest:
                if (HttpRequest == null)
                {
                    HttpRequest = new global::Google.Cloud.Tasks.V2Beta3.HttpRequest();
                }
                HttpRequest.MergeFrom(other.HttpRequest);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Beispiel #19
0
        public void MergeFrom(Model other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Name.Length != 0)
            {
                Name = other.Name;
            }
            if (other.DisplayName.Length != 0)
            {
                DisplayName = other.DisplayName;
            }
            if (other.DatasetId.Length != 0)
            {
                DatasetId = other.DatasetId;
            }
            if (other.createTime_ != null)
            {
                if (createTime_ == null)
                {
                    CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                }
                CreateTime.MergeFrom(other.CreateTime);
            }
            if (other.updateTime_ != null)
            {
                if (updateTime_ == null)
                {
                    UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                }
                UpdateTime.MergeFrom(other.UpdateTime);
            }
            if (other.DeploymentState != 0)
            {
                DeploymentState = other.DeploymentState;
            }
            if (other.Etag.Length != 0)
            {
                Etag = other.Etag;
            }
            labels_.Add(other.labels_);
            switch (other.ModelMetadataCase)
            {
            case ModelMetadataOneofCase.TranslationModelMetadata:
                if (TranslationModelMetadata == null)
                {
                    TranslationModelMetadata = new global::Google.Cloud.AutoML.V1.TranslationModelMetadata();
                }
                TranslationModelMetadata.MergeFrom(other.TranslationModelMetadata);
                break;

            case ModelMetadataOneofCase.ImageClassificationModelMetadata:
                if (ImageClassificationModelMetadata == null)
                {
                    ImageClassificationModelMetadata = new global::Google.Cloud.AutoML.V1.ImageClassificationModelMetadata();
                }
                ImageClassificationModelMetadata.MergeFrom(other.ImageClassificationModelMetadata);
                break;

            case ModelMetadataOneofCase.TextClassificationModelMetadata:
                if (TextClassificationModelMetadata == null)
                {
                    TextClassificationModelMetadata = new global::Google.Cloud.AutoML.V1.TextClassificationModelMetadata();
                }
                TextClassificationModelMetadata.MergeFrom(other.TextClassificationModelMetadata);
                break;

            case ModelMetadataOneofCase.ImageObjectDetectionModelMetadata:
                if (ImageObjectDetectionModelMetadata == null)
                {
                    ImageObjectDetectionModelMetadata = new global::Google.Cloud.AutoML.V1.ImageObjectDetectionModelMetadata();
                }
                ImageObjectDetectionModelMetadata.MergeFrom(other.ImageObjectDetectionModelMetadata);
                break;

            case ModelMetadataOneofCase.TextExtractionModelMetadata:
                if (TextExtractionModelMetadata == null)
                {
                    TextExtractionModelMetadata = new global::Google.Cloud.AutoML.V1.TextExtractionModelMetadata();
                }
                TextExtractionModelMetadata.MergeFrom(other.TextExtractionModelMetadata);
                break;

            case ModelMetadataOneofCase.TextSentimentModelMetadata:
                if (TextSentimentModelMetadata == null)
                {
                    TextSentimentModelMetadata = new global::Google.Cloud.AutoML.V1.TextSentimentModelMetadata();
                }
                TextSentimentModelMetadata.MergeFrom(other.TextSentimentModelMetadata);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (ExternalId.Length != 0)
            {
                hash ^= ExternalId.GetHashCode();
            }
            if (Profile.Length != 0)
            {
                hash ^= Profile.GetHashCode();
            }
            if (Job.Length != 0)
            {
                hash ^= Job.GetHashCode();
            }
            if (Company.Length != 0)
            {
                hash ^= Company.GetHashCode();
            }
            if (applicationDate_ != null)
            {
                hash ^= ApplicationDate.GetHashCode();
            }
            if (Stage != 0)
            {
                hash ^= Stage.GetHashCode();
            }
            if (State != 0)
            {
                hash ^= State.GetHashCode();
            }
            hash ^= interviews_.GetHashCode();
            if (referral_ != null)
            {
                hash ^= Referral.GetHashCode();
            }
            if (createTime_ != null)
            {
                hash ^= CreateTime.GetHashCode();
            }
            if (updateTime_ != null)
            {
                hash ^= UpdateTime.GetHashCode();
            }
            if (OutcomeNotes.Length != 0)
            {
                hash ^= OutcomeNotes.GetHashCode();
            }
            if (Outcome != 0)
            {
                hash ^= Outcome.GetHashCode();
            }
            if (isMatch_ != null)
            {
                hash ^= IsMatch.GetHashCode();
            }
            if (JobTitleSnippet.Length != 0)
            {
                hash ^= JobTitleSnippet.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Beispiel #21
0
 protected bool Equals(AccountDTO other)
 {
     return(base.Equals(other) && CreateTime.Equals(other.CreateTime) && ModifyTime.Equals(other.ModifyTime) &&
            Equals(Photo, other.Photo) && FirstName == other.FirstName && LastName == other.LastName &&
            Nickname == other.Nickname && Birthday.Equals(other.Birthday) && Email == other.Email);
 }
Beispiel #22
0
 public void Init()
 {
     Id                = Guid.NewGuid();
     CreateTime        = DateTime.Now;
     SelfDefineDataTag = CreateTime.ToString("yyyyMMddHHmmss");
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (DisplayName.Length != 0)
            {
                hash ^= DisplayName.GetHashCode();
            }
            if (studySpec_ != null)
            {
                hash ^= StudySpec.GetHashCode();
            }
            if (MaxTrialCount != 0)
            {
                hash ^= MaxTrialCount.GetHashCode();
            }
            if (ParallelTrialCount != 0)
            {
                hash ^= ParallelTrialCount.GetHashCode();
            }
            if (MaxFailedTrialCount != 0)
            {
                hash ^= MaxFailedTrialCount.GetHashCode();
            }
            if (trialJobSpec_ != null)
            {
                hash ^= TrialJobSpec.GetHashCode();
            }
            hash ^= trials_.GetHashCode();
            if (State != global::Google.Cloud.AIPlatform.V1.JobState.Unspecified)
            {
                hash ^= State.GetHashCode();
            }
            if (createTime_ != null)
            {
                hash ^= CreateTime.GetHashCode();
            }
            if (startTime_ != null)
            {
                hash ^= StartTime.GetHashCode();
            }
            if (endTime_ != null)
            {
                hash ^= EndTime.GetHashCode();
            }
            if (updateTime_ != null)
            {
                hash ^= UpdateTime.GetHashCode();
            }
            if (error_ != null)
            {
                hash ^= Error.GetHashCode();
            }
            hash ^= Labels.GetHashCode();
            if (encryptionSpec_ != null)
            {
                hash ^= EncryptionSpec.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }