public override int GetHashCode() { unchecked { return(((FriendlyName != null ? FriendlyName.GetHashCode() : 0) * 397) ^ DeviceGuid.GetHashCode()); } }
public int CompareTo(PluginDescriptor other) { if (DisplayOrder != other.DisplayOrder) return DisplayOrder.CompareTo(other.DisplayOrder); return FriendlyName.CompareTo(other.FriendlyName); }
private static void LoadVersionFromLinux() { Name = FriendlyName = OSUtility.Linux; isLinux = true; string tempFile = GetTempFileName(); using Process p = Process.Start("/bin/bash", "-c \"cat /etc/*release* > " + tempFile + "\""); p.WaitForExit(); System.Threading.Tasks.Task.Delay(100); // wait a small bit for file to really be closed string versionText = File.ReadAllText(tempFile).Trim(); ExtensionMethods.FileDeleteWithRetry(tempFile); if (string.IsNullOrWhiteSpace(versionText)) { Logger.Error(new IOException("Unable to load os version from /etc/*release* ...")); } else { FriendlyName = ExtractRegex(versionText, "^(Id|Distrib_Id)=(?<value>.*?)$", string.Empty); if (FriendlyName.Length != 0) { string codeName = ExtractRegex(versionText, "^(Name|Distrib_CodeName)=(?<value>.+)$", string.Empty); if (codeName.Length != 0) { FriendlyName += " - " + codeName; } Version = ExtractRegex(versionText, "^Version_Id=(?<value>.+)$", Version); } } UsesYumPackageManager = FriendlyName.Contains("centos", StringComparison.OrdinalIgnoreCase) || OSUtility.FriendlyName.Contains("fedora", StringComparison.OrdinalIgnoreCase) || OSUtility.FriendlyName.Contains("red hat", StringComparison.OrdinalIgnoreCase) || OSUtility.FriendlyName.Contains("redhat", StringComparison.OrdinalIgnoreCase); }
public Chromosome(ISequence sequence, Genome genome) : base(genome, sequence.ID, "", "+", 1, sequence.Count) { Sequence = sequence; FriendlyName = GetFriendlyChromosomeName(ChromosomeID); Mitochondrial = FriendlyName.StartsWith("M") || FriendlyName.StartsWith("chrM"); }
/// <summary> /// Initializes a new instance of the CommandGet class. /// </summary> /// <param name="name">name property</param> /// <param name="fromSourceSystem">fromSourceSystem property</param> /// <param name="id">Id property</param> /// <param name="etag">ETag property</param> /// <param name="timestamp">Timestamp property</param> /// <param name="effectiveRights">EffectiveRights property</param> /// <param name="containerId">containerId property</param> /// <param name="descriptions">Description property, used to describe /// assets</param> /// <param name="experts">The data steward of the asset</param> /// <param name="tags">Taging the asset</param> /// <param name="termTags">Taging the asset using glossary terms, this /// is a feature only for standard SKU</param> /// <param name="columnDescriptions">Descriptions of a column</param> /// <param name="columnTags">Tagging a column</param> /// <param name="columnTermTags">Tagging a column with glossary terms, /// this is a feature only for standard SKU </param> /// <param name="parameterDescriptions">Parameter descriptions</param> /// <param name="parameterTags">Tagging a parameter</param> /// <param name="parameterTermTags">Tagging a parameter with glossary /// terms, this is a feature only for standard SKU</param> public CommandGet(string name, Dsl dsl, DataSource dataSource, LastRegisteredBy lastRegisteredBy, bool fromSourceSystem, string id = default(string), string etag = default(string), string timestamp = default(string), System.Collections.Generic.IList <RightsItems?> effectiveRights = default(System.Collections.Generic.IList <RightsItems?>), System.Collections.Generic.IList <RolesItem> roles = default(System.Collections.Generic.IList <RolesItem>), double?containerId = default(double?), System.Collections.Generic.IList <Description> descriptions = default(System.Collections.Generic.IList <Description>), System.Collections.Generic.IList <Expert> experts = default(System.Collections.Generic.IList <Expert>), AccessInstruction accessInstructions = default(AccessInstruction), Documentation documentation = default(Documentation), FriendlyName friendlyName = default(FriendlyName), System.Collections.Generic.IList <Tag> tags = default(System.Collections.Generic.IList <Tag>), System.Collections.Generic.IList <TermTag> termTags = default(System.Collections.Generic.IList <TermTag>), CommandSchema schema = default(CommandSchema), System.Collections.Generic.IList <ColumnDescription> columnDescriptions = default(System.Collections.Generic.IList <ColumnDescription>), System.Collections.Generic.IList <ColumnTag> columnTags = default(System.Collections.Generic.IList <ColumnTag>), System.Collections.Generic.IList <ColumnTermTag> columnTermTags = default(System.Collections.Generic.IList <ColumnTermTag>), System.Collections.Generic.IList <ParameterDescription> parameterDescriptions = default(System.Collections.Generic.IList <ParameterDescription>), System.Collections.Generic.IList <ParameterTag> parameterTags = default(System.Collections.Generic.IList <ParameterTag>), System.Collections.Generic.IList <ParameterTermTag> parameterTermTags = default(System.Collections.Generic.IList <ParameterTermTag>)) : base(id, etag, timestamp, effectiveRights) { Roles = roles; Name = name; Dsl = dsl; DataSource = dataSource; LastRegisteredBy = lastRegisteredBy; FromSourceSystem = fromSourceSystem; ContainerId = containerId; Descriptions = descriptions; Experts = experts; AccessInstructions = accessInstructions; Documentation = documentation; FriendlyName = friendlyName; Tags = tags; TermTags = termTags; Schema = schema; ColumnDescriptions = columnDescriptions; ColumnTags = columnTags; ColumnTermTags = columnTermTags; ParameterDescriptions = parameterDescriptions; ParameterTags = parameterTags; ParameterTermTags = parameterTermTags; }
/// <summary> /// Compares this instance with a specified ModuleInfo object /// </summary> /// <param name="value"></param> /// <returns></returns> public virtual int CompareTo(ModuleInfo otherModule) { if (Priority != otherModule.Priority) { return(Priority.CompareTo(otherModule.Priority)); } return(FriendlyName.CompareTo(otherModule.FriendlyName)); }
/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns>The hash code for the <strong>Oid2</strong> as an integer.</returns> public override Int32 GetHashCode() { unchecked { Int32 hashCode = Value?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (Int32)OidGroup; hashCode = (hashCode * 397) ^ (FriendlyName?.GetHashCode() ?? 0); return(hashCode); } }
public int CompareTo(PluginDescriptor other) { if (DisplaySubscription != other.DisplaySubscription) { return(DisplaySubscription.CompareTo(other.DisplaySubscription)); } return(FriendlyName.CompareTo(other.FriendlyName)); }
void ComputeHashCode() { _hashCode = Name.GetHashCode(); _hashCode ^= FriendlyName.GetHashCode(); _hashCode ^= NameFormat.GetHashCode(); _hashCode ^= Namespace.GetHashCode(); _hashCode ^= ValueType.GetHashCode(); _hashCode ^= OriginalIssuer.GetHashCode(); }
/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns>The hash code for the <strong>Oid2</strong> as an integer.</returns> public override Int32 GetHashCode() { unchecked { Int32 hashCode = (Value != null ? Value.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Int32)OidGroup; hashCode = (hashCode * 397) ^ (FriendlyName != null ? FriendlyName.GetHashCode() : 0); return(hashCode); } }
public virtual int CompareTo(PluginDescriptor other) { if (DisplayOrder != other.DisplayOrder) { return(DisplayOrder.CompareTo(other.DisplayOrder)); } return(FriendlyName.CompareTo(other.FriendlyName)); }
public void CheckWebIf() { Host = ContentDirectoryControlUri.DnsSafeHost; Host = FriendlyName.Replace("XBMC (", "").Replace(")", ""); VlcPort = 8080; WebInterfacePort = 80; User = "******"; VlcPassword = "******"; }
/// <summary> /// Indicates whether the current object is equal to another object of the same type. /// </summary> /// <param name="other">An object to compare with this object.</param> /// <returns> /// <c>true</c> if the current object is equal to the other parameter; otherwise, <c>false</c>. /// </returns> public bool Equals(AttributeKey other) { return(other != null && FriendlyName.Equals(other.FriendlyName) && Name.Equals(other.Name) && NameFormat.Equals(other.NameFormat) && ValueType.Equals(other.ValueType) && OriginalIssuer.Equals(other.OriginalIssuer)); }
/// <summary> /// Indicates whether the current object is equal to another object of the same type. /// </summary> /// <param name="other">An object to compare with this object.</param> /// <returns> /// <c>true</c> if the current object is equal to the other parameter; otherwise, <c>false</c>. /// </returns> public bool Equals(AttributeKey other) { return(other != null && FriendlyName.Equals(other.FriendlyName, StringComparison.Ordinal) && Name.Equals(other.Name, StringComparison.Ordinal) && NameFormat.Equals(other.NameFormat, StringComparison.Ordinal) && ValueType.Equals(other.ValueType, StringComparison.Ordinal) && OriginalIssuer.Equals(other.OriginalIssuer, StringComparison.Ordinal)); }
public override int GetHashCode() { unchecked { var hashCode = (FriendlyName != null ? FriendlyName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ RemoteHostId.GetHashCode(); hashCode = (hashCode * 397) ^ (LocalIp != null ? LocalIp.GetHashCode() : 0); return(hashCode); } }
public int CompareTo(PluginDescriptor other) { //实现CompareTo方法是为了以后插件排序 if (DisplayOrder != other.DisplayOrder) { return(DisplayOrder.CompareTo(other.DisplayOrder)); } return(FriendlyName.CompareTo(other.FriendlyName)); }
public override int GetHashCode() { unchecked { var hashCode = (FriendlyName != null ? FriendlyName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (DeviceId != null ? DeviceId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Device != null ? Device.GetHashCode() : 0); return(hashCode); } }
int ComputeHashCode() { int hashCode = Name.GetHashCode(); hashCode ^= FriendlyName.GetHashCode(); hashCode ^= NameFormat.GetHashCode(); hashCode ^= ValueType.GetHashCode(); hashCode ^= OriginalIssuer.GetHashCode(); return(hashCode); }
/// <summary> /// /// </summary> /// <param name="other"></param> /// <returns></returns> public int CompareTo(PluginDescriptor other) { //首先比较DisplayOrder,如果一致则比较FriendlyName if (DisplayOrder != other.DisplayOrder) { return(DisplayOrder.CompareTo(other.DisplayOrder)); } return(FriendlyName.CompareTo(other.FriendlyName)); }
public override int GetHashCode() { unchecked { var hashCode = Id; hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (FriendlyName != null ? FriendlyName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Link != null ? Link.GetHashCode() : 0); return(hashCode); } }
public int CompareTo(PluginDescriptor other) { if (DisplayOrder != other.DisplayOrder) { return(DisplayOrder.CompareTo(other.DisplayOrder)); } else if (FriendlyName != null) { return(FriendlyName.CompareTo(other.FriendlyName)); } return(0); }
public override int GetHashCode() { unchecked { var hashCode = CategoryId.GetHashCode(); hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (FriendlyName != null ? FriendlyName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CategoryUrl != null ? CategoryUrl.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CouponsCount.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = FriendlyName != null?FriendlyName.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (MCode != null ? MCode.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ProductId; hashCode = (hashCode * 397) ^ MId; return(hashCode); } }
/// <summary> /// Gets the Serial Port Name. ex. "COM1" /// </summary> public String Port() { if (_Port == null) { // ex. "Communications Port (COM1)" var start = FriendlyName.IndexOf('(') + 1; var end = FriendlyName.IndexOf(')'); _Port = FriendlyName.Substring(start, end - start); } return(_Port); }
public override int GetHashCode() { unchecked { var hashCode = Id.GetHashCode(); hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (FriendlyName != null ? FriendlyName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ImageUrl != null ? ImageUrl.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (StoreUrl != null ? StoreUrl.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { int hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (FriendlyName?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (SingleRef?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (SingleSelfRef?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (SingleRecurse?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (ResolveOnly?.GetHashCode() ?? 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = StoreId.GetHashCode(); hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (FriendlyName != null ? FriendlyName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ImageUrl != null ? ImageUrl.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (StoreUrl != null ? StoreUrl.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CouponsCount.GetHashCode(); return(hashCode); } }
/// <summary> /// Initializes a new instance of the Container class. /// </summary> /// <param name="name">name property</param> /// <param name="fromSourceSystem">fromSourceSystem property</param> /// <param name="descriptions">Description property, used to describe /// assets</param> /// <param name="experts">The data steward of the asset</param> /// <param name="tags">Taging the asset</param> /// <param name="termTags">Taging the asset using glossary terms, this /// is a feature only for standard SKU</param> public Container(string name, Dsl dsl, DataSource dataSource, LastRegisteredBy lastRegisteredBy, bool fromSourceSystem, System.Collections.Generic.IList <RolesItem> roles = default(System.Collections.Generic.IList <RolesItem>), System.Collections.Generic.IList <Description> descriptions = default(System.Collections.Generic.IList <Description>), System.Collections.Generic.IList <Expert> experts = default(System.Collections.Generic.IList <Expert>), AccessInstruction accessInstructions = default(AccessInstruction), Documentation documentation = default(Documentation), FriendlyName friendlyName = default(FriendlyName), System.Collections.Generic.IList <Tag> tags = default(System.Collections.Generic.IList <Tag>), System.Collections.Generic.IList <TermTag> termTags = default(System.Collections.Generic.IList <TermTag>)) { Roles = roles; Name = name; Dsl = dsl; DataSource = dataSource; LastRegisteredBy = lastRegisteredBy; FromSourceSystem = fromSourceSystem; Descriptions = descriptions; Experts = experts; AccessInstructions = accessInstructions; Documentation = documentation; FriendlyName = friendlyName; Tags = tags; TermTags = termTags; }
protected override async Task <Action <AsyncCodeActivityContext> > ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken) { // Object Container: Use objectContainer.Get<T>() to retrieve objects from the scope var objectContainer = context.GetFromContext <IObjectContainer>(TwilioApiScope.ParentContainerPropertyTag); // Inputs var friendlyname = FriendlyName.Get(context); var account = await AccountWrappers.CreateAccountAsync(objectContainer.Get <ITwilioRestClient>(), friendlyname); // Outputs return((ctx) => { Account.Set(ctx, account); }); }
public void Normalize() { if (_tokenCount != -1) { return; } var tokens = FriendlyName.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); var count = tokens.Length; var array = new NormalizedFontFamilyReference[count]; for (int i = 0; i < count; i++) { array[i] = NormalizedFontFamilyReference.Create(BaseUri, NormalizeFontFamilyReference(tokens[i])); } _tokenCount = count; _nffReferences = array; }