コード例 #1
0
 public void Finish(int queueLength, DateTime finishConsumptionTime)
 {
     LogTask?.Invoke(this, $"Queuelength: {queueLength}, Task {TaskNumber} wurde um {CreationTime.ToShortTimeString()} erzeugt und von {BeginConsumptionTime.ToShortTimeString()} - {finishConsumptionTime.ToShortTimeString()} bearbeitet!");
 }
コード例 #2
0
        public string GetDataText()
        {
            string OutputText = "SiiNunit\r\n{\r\n";

            OutputText += "user_profile : " + UserProfileNameless + " {\r\n";
            OutputText += " face: " + Face.ToString() + "\r\n";
            OutputText += " brand: " + Brand + "\r\n";
            OutputText += " map_path: " + MapPath + "\r\n";
            OutputText += " logo: " + Logo + "\r\n";
            OutputText += " company_name: " + (!CheckStringContainsUnescape(CompanyName) ? CompanyName : "\"" + CompanyName + "\"") + "\r\n";
            OutputText += " male: " + GenederMale.ToString().ToLower() + "\r\n";
            OutputText += " cached_experience: " + CachedExperiencePoints.ToString() + "\r\n";
            OutputText += " cached_distance: " + CachedDistance.ToString() + "\r\n";

            if (Version == 4)
            {
                OutputText += " version: " + Version.ToString() + "\r\n";
                OutputText += " online_user_name: " + (!string.IsNullOrEmpty(OnlineUserName) ? OnlineUserName : "******"\"") + "\r\n";
                OutputText += " online_password: "******"\"\"") + "\r\n";
            }

            OutputText += " user_data: 17\r\n";
            OutputText += " user_data[0]: " + ((SomeTimeUD0 != null) ? SomeTimeUD0.ToString() : "\"\"") + "\r\n";
            OutputText += " user_data[1]: " + ((LicensePlateUD1 != null) ? "\"" + LicensePlateUD1 + "\"" : "\"\"") + "\r\n";
            OutputText += " user_data[2]: " + ((SomeCheckSumUD2 != null) ? SomeCheckSumUD2 : "\"\"") + "\r\n";
            OutputText += " user_data[3]: " + ((WoTConnectedUD3 != null) ? WoTConnectedUD3.ToString() : "\"\"") + "\r\n";
            OutputText += " user_data[4]: \"" + RoadsExploredUD4.ToString(CultureInfo.InvariantCulture) + "\"\r\n";
            OutputText += " user_data[5]: " + DeliveriesFinishedUD5.ToString() + "\r\n";
            OutputText += " user_data[6]: " + OwnedTrucksUD6.ToString() + "\r\n";
            OutputText += " user_data[7]: " + OwnedGaradesSmallUD7.ToString() + "\r\n";
            OutputText += " user_data[8]: " + OwnedGaradesLargeUD8.ToString() + "\r\n";
            OutputText += " user_data[9]: " + GameTimeSpentUD9.ToString() + "\r\n";
            OutputText += " user_data[10]: " + RealTimeSpentUD10.ToString() + "\r\n";
            OutputText += " user_data[11]: \"" + CurrentTruckUD11 + "\"" + "\r\n";
            OutputText += " user_data[12]: \"" + string.Join(",", OwnedTruckListUD12) + "\"" + "\r\n";
            OutputText += " user_data[13]: " + (!string.IsNullOrEmpty(SomeUserDataUD13) ? SomeUserDataUD13 : "\"\"") + "\r\n";
            OutputText += " user_data[14]: " + ((SomeUserDataUD14 != null) ? SomeUserDataUD14.ToString() : "\"\"") + "\r\n";
            OutputText += " user_data[15]: " + (!string.IsNullOrEmpty(SomeUserDataUD15) ? SomeUserDataUD15 : "\"\"") + "\r\n";
            OutputText += " user_data[16]: " + OwnedTrailersUD16.ToString() + "\r\n";

            OutputText += " active_mods: " + ActiveMods.Capacity.ToString() + "\r\n";
            for (int i = 0; i < ActiveMods.Capacity; i++)
            {
                OutputText += " active_mods[" + i.ToString() + "]: " + ActiveMods[i].ToString() + "\r\n";
            }

            OutputText += " customization: " + Customization.ToString() + "\r\n";

            OutputText += " cached_stats: " + CachedStats.Capacity.ToString() + "\r\n";
            for (int i = 0; i < CachedStats.Capacity; i++)
            {
                OutputText += " cached_stats[" + i.ToString() + "]: " + CachedStats[i].ToString() + "\r\n";
            }

            OutputText += " cached_discovery: " + CachedDiscovery.Capacity.ToString() + "\r\n";
            for (int i = 0; i < CachedDiscovery.Capacity; i++)
            {
                OutputText += " cached_discovery[" + i.ToString() + "]: " + CachedDiscovery[i].ToString() + "\r\n";
            }

            if (Version == 5)
            {
                OutputText += " version: " + Version.ToString() + "\r\n";
                OutputText += " online_user_name: " + (!string.IsNullOrEmpty(OnlineUserName) ? OnlineUserName : "******"\"") + "\r\n";
                OutputText += " online_password: "******"\"\"") + "\r\n";
            }

            OutputText += " profile_name: " + (!CheckStringContainsUnescape(ProfileName) ? ProfileName : "\"" + ProfileName + "\"") + "\r\n";
            OutputText += " creation_time: " + CreationTime.ToString() + "\r\n";
            OutputText += " save_time: " + SaveTime.ToString() + "\r\n";

            OutputText += "}\r\n\r\n}";

            return(OutputText);
        }
コード例 #3
0
ファイル: SvnLockInfo.cs プロジェクト: mendix/LibSvnSharp
        /// <summary>Serves as a hashcode for the specified type</summary>
        public override int GetHashCode()
        {
            string owner = Owner;
            string path  = Path;

            return((owner != null ? owner.GetHashCode() : 0) ^ (path != null ? path.GetHashCode() : 0) ^ CreationTime.GetHashCode());
        }
コード例 #4
0
 public override string ToString()
 {
     return($"ExecutorId:{ExecutorId}; ServiceId:{ServiceIndustryId}; CustomerId:{CustomerId}; Price:{Price}; CreationTime:{CreationTime.ToString("dd-mm-yyyy")}");
 }
コード例 #5
0
 public override string ToString()
 {
     return(CreationTime.ToString("yyyy/MM/dd HH:mm:ss.fff ") + value);
 }
コード例 #6
0
 public override string ToString()
 {
     return($"{CreationTime.ToUniversalTime():yyyy-MM-dd HH:mm:ss.fffffff}, OS Major: {OsMajor}, OS Minor: {OsMinor}, OS Build: {OsBuild}");
 }
コード例 #7
0
 public void Finish(int lenght, DateTime time)
 {
     LogTask?.Invoke(this, $"Quelength {_count}, Task {TaskNumber} wurde um {CreationTime.ToShortTimeString()} erzeugt und von {BeginConsuptionTime.ToShortTimeString()} - {time.ToShortTimeString()} bearbeitet!");
 }
コード例 #8
0
        /// <summary>
        /// Serializes this instance of <see cref="VmRecoveryPoint" /> into a <see cref="Carbon.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Carbon.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Rest.ClientRuntime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="VmRecoveryPoint" /> as a <see cref="Carbon.Json.JsonNode" />.
        /// </returns>
        public Carbon.Json.JsonNode ToJson(Carbon.Json.JsonObject container, Microsoft.Rest.ClientRuntime.SerializationMode serializationMode)
        {
            container = container ?? new Carbon.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != Name ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(Name) : null, "name", container.Add);
            AddIf(null != AvailabilityZoneReference ? (Carbon.Json.JsonNode)AvailabilityZoneReference.ToJson(null) : null, "availability_zone_reference", container.Add);
            AddIf(null != ClusterReference ? (Carbon.Json.JsonNode)ClusterReference.ToJson(null) : null, "cluster_reference", container.Add);
            AddIf(null != CreationTime ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(CreationTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", System.Globalization.CultureInfo.InvariantCulture)) : null, "creation_time", container.Add);
            AddIf(null != ExpirationTime ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(ExpirationTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", System.Globalization.CultureInfo.InvariantCulture)) : null, "expiration_time", container.Add);
            AddIf(null != RecoveryPointType ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(RecoveryPointType) : null, "recovery_point_type", container.Add);
            AddIf(null != Resources ? (Carbon.Json.JsonNode)Resources.ToJson(null) : null, "resources", container.Add);
            AfterToJson(ref container);
            return(container);
        }
コード例 #9
0
 public override string ToString()
 {
     return(CreationTime.ToString());
 }
コード例 #10
0
        /// <summary>
        /// Serializes this instance of <see cref="UserMetadata" /> into a <see cref="Carbon.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Carbon.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Rest.ClientRuntime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="UserMetadata" /> as a <see cref="Carbon.Json.JsonNode" />.
        /// </returns>
        public Carbon.Json.JsonNode ToJson(Carbon.Json.JsonObject container, Microsoft.Rest.ClientRuntime.SerializationMode serializationMode)
        {
            container = container ?? new Carbon.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Rest.ClientRuntime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != Name ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(Name) : null, "name", container.Add);
            }
            /* serializeToContainerMember (wildcard) doesn't support 'application/json' C:\Users\hugo1\Documents\autorest\autorest.incubator\dist\csharp\schema\wildcard.js*/
            if (serializationMode.HasFlag(Microsoft.Rest.ClientRuntime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != CreationTime ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(CreationTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", System.Globalization.CultureInfo.InvariantCulture)) : null, "creation_time", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Rest.ClientRuntime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != Kind ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(Kind) : null, "kind", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Rest.ClientRuntime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != LastUpdateTime ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(LastUpdateTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", System.Globalization.CultureInfo.InvariantCulture)) : null, "last_update_time", container.Add);
            }
            AddIf(null != OwnerReference ? (Carbon.Json.JsonNode)OwnerReference.ToJson(null) : null, "owner_reference", container.Add);
            AddIf(null != ProjectReference ? (Carbon.Json.JsonNode)ProjectReference.ToJson(null) : null, "project_reference", container.Add);
            AddIf(null != SpecHash ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(SpecHash) : null, "spec_hash", container.Add);
            AddIf(null != SpecVersion ? (Carbon.Json.JsonNode) new Carbon.Json.JsonNumber((int)SpecVersion) : null, "spec_version", container.Add);
            AddIf(null != Uuid ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(Uuid) : null, "uuid", container.Add);
            AfterToJson(ref container);
            return(container);
        }
コード例 #11
0
ファイル: ItemInDatabase.cs プロジェクト: copyleftdev/octopus
 internal virtual string GetCsvLine()
 {
     return(GetItemType() + ",\"" + GetVolumeUserName() + "\",\"" + GetPath() + "\",\"" + Name + "\",\"" + Attributes.ToString() + "\"," + CreationTime.ToString() + ",\"" + Description + "\",\"" + Keywords + "\"," + LastAccessTime.ToString() + "," + LastWriteTime.ToString());
 }
コード例 #12
0
        /// <summary>
        /// Serializes this instance of <see cref="Task" /> into a <see cref="Carbon.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Carbon.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Rest.ClientRuntime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="Task" /> as a <see cref="Carbon.Json.JsonNode" />.
        /// </returns>
        public Carbon.Json.JsonNode ToJson(Carbon.Json.JsonObject container, Microsoft.Rest.ClientRuntime.SerializationMode serializationMode)
        {
            container = container ?? new Carbon.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            AddIf(null != ApiVersion ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(ApiVersion) : null, "api_version", container.Add);
            AddIf(null != ClusterReference ? (Carbon.Json.JsonNode)ClusterReference.ToJson(null) : null, "cluster_reference", container.Add);
            AddIf(null != CompletionTime ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(CompletionTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", System.Globalization.CultureInfo.InvariantCulture)) : null, "completion_time", container.Add);
            AddIf(null != CreationTime ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(CreationTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", System.Globalization.CultureInfo.InvariantCulture)) : null, "creation_time", container.Add);
            if (null != EntityReferenceList)
            {
                var __w = new Carbon.Json.XNodeArray();
                foreach (var __x in EntityReferenceList)
                {
                    AddIf(__x?.ToJson(null), __w.Add);
                }
                container.Add("entity_reference_list", __w);
            }
            AddIf(null != ErrorCode ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(ErrorCode) : null, "error_code", container.Add);
            AddIf(null != ErrorDetail ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(ErrorDetail) : null, "error_detail", container.Add);
            AddIf(null != LastUpdateTime ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(LastUpdateTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", System.Globalization.CultureInfo.InvariantCulture)) : null, "last_update_time", container.Add);
            AddIf(null != LogicalTimestamp ? (Carbon.Json.JsonNode) new Carbon.Json.JsonNumber((long)LogicalTimestamp) : null, "logical_timestamp", container.Add);
            AddIf(null != OperationType ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(OperationType) : null, "operation_type", container.Add);
            AddIf(null != ParentTaskReference ? (Carbon.Json.JsonNode)ParentTaskReference.ToJson(null) : null, "parent_task_reference", container.Add);
            AddIf(null != PercentageComplete ? (Carbon.Json.JsonNode) new Carbon.Json.JsonNumber((int)PercentageComplete) : null, "percentage_complete", container.Add);
            AddIf(null != ProgressMessage ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(ProgressMessage) : null, "progress_message", container.Add);
            AddIf(null != StartTime ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(StartTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", System.Globalization.CultureInfo.InvariantCulture)) : null, "start_time", container.Add);
            AddIf(null != Status ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(Status) : null, "status", container.Add);
            if (null != SubtaskReferenceList)
            {
                var __r = new Carbon.Json.XNodeArray();
                foreach (var __s in SubtaskReferenceList)
                {
                    AddIf(__s?.ToJson(null), __r.Add);
                }
                container.Add("subtask_reference_list", __r);
            }
            AddIf(null != Uuid ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(Uuid) : null, "uuid", container.Add);
            AfterToJson(ref container);
            return(container);
        }
コード例 #13
0
 public void SetTimestamp(CreationTime creationTime)
 {
     Timestamp = creationTime;
 }
コード例 #14
0
 public override string ToString()
 {
     return(string.Format("Version {0}, Date: {1}, Length: {2}", Version, CreationTime.ToShortDateString(), Length));
 }
コード例 #15
0
 //Interfaces
 public int CompareTo(CreationIdentifier other)
 {
     return(CreationTime.CompareTo(other.CreationTime));
 }
コード例 #16
0
 public override string ToString()
 {
     if (this.TransactionType == TransactionTypeEnum.Deposit)
     {
         return($"({this.Id}) - Deposito: desde {this.OriginAccount} hasta {this.DestinyAccount} - {CreationTime.ToShortDateString()}");
     }
     else
     {
         return($"({this.Id}) - Retiro: de la cuenta {this.OriginAccount} - {CreationTime.ToShortDateString()}");
     }
 }
コード例 #17
0
ファイル: TicketInfo.cs プロジェクト: zuvys/sso
 public TicketInfo()
 {
     CreationTime = DateTime.Now;
     ExpireTime   = CreationTime.AddHours(2);//默认有效期:2小时
     Claims       = new List <NameValue>();
 }
コード例 #18
0
ファイル: Safe.cs プロジェクト: dangershony/HBitcoin
 public string GetCreationTimeString()
 {
     return(CreationTime.ToString("s", CultureInfo.InvariantCulture));
 }
コード例 #19
0
ファイル: SessionInfo.cs プロジェクト: xj361685640/BoSSS
 /// <summary>
 /// Creates a string representation of this object.
 /// </summary>
 /// <returns>A string representing the object.</returns>
 public override string ToString()
 {
     return("{ Guid = " + ID + "; " + CreationTime.ToString() + " Name = " + Name + " }");
 }
コード例 #20
0
ファイル: ImageMetadata.json.cs プロジェクト: gmlp/PowerShell
        /// <summary>
        /// Serializes this instance of <see cref="ImageMetadata" /> into a <see cref="Carbon.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Carbon.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Rest.ClientRuntime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="ImageMetadata" /> as a <see cref="Carbon.Json.JsonNode" />.
        /// </returns>
        public Carbon.Json.JsonNode ToJson(Carbon.Json.JsonObject container, Microsoft.Rest.ClientRuntime.SerializationMode serializationMode)
        {
            container = container ?? new Carbon.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Rest.ClientRuntime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != Name ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(Name) : null, "name", container.Add);
            }
            if (null != Categories)
            {
                foreach (var __x in Categories)
                {
                    AddIf(null != __x.Value ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(__x.Value) : null, (__w) => container.Add(__x.Key, __w));
                }
            }
            if (serializationMode.HasFlag(Microsoft.Rest.ClientRuntime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != CreationTime ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(CreationTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", System.Globalization.CultureInfo.InvariantCulture)) : null, "creation_time", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Rest.ClientRuntime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != Kind ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(Kind) : null, "kind", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Rest.ClientRuntime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != LastUpdateTime ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(LastUpdateTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", System.Globalization.CultureInfo.InvariantCulture)) : null, "last_update_time", container.Add);
            }
            AddIf(null != OwnerReference ? (Carbon.Json.JsonNode)OwnerReference.ToJson(null) : null, "owner_reference", container.Add);
            AddIf(null != ProjectReference ? (Carbon.Json.JsonNode)ProjectReference.ToJson(null) : null, "project_reference", container.Add);
            AddIf(null != SpecHash ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(SpecHash) : null, "spec_hash", container.Add);
            AddIf(null != SpecVersion ? (Carbon.Json.JsonNode) new Carbon.Json.JsonNumber((int)SpecVersion) : null, "spec_version", container.Add);
            AddIf(null != Uuid ? (Carbon.Json.JsonNode) new Carbon.Json.JsonString(Uuid) : null, "uuid", container.Add);
            AfterToJson(ref container);
            return(container);
        }
コード例 #21
0
ファイル: FitFunctionScript.cs プロジェクト: olesar/Altaxo
 public override string ToString()
 {
     return(string.Format("FitFunctionScript {0} (created {1})", FitFunctionName, CreationTime.ToString("yyyy-MM-dd HH:mm:ss")));
 }
コード例 #22
0
 public bool IsValid() => CreationTime.AddDays(1d).CompareTo(DateTime.Now) > 0;
コード例 #23
0
 public bool IsAllowedCancellationTimeEnded()
 {
     return(CreationTime.Subtract(Clock.Now).TotalHours <= 2.0); //2 hours can be defined as Event property and determined per event
 }