public override int GetHashCode() { int hash = 1; if (Use.Length != 0) { hash ^= Use.GetHashCode(); } if (Short.Length != 0) { hash ^= Short.GetHashCode(); } if (Long.Length != 0) { hash ^= Long.GetHashCode(); } if (Example.Length != 0) { hash ^= Example.GetHashCode(); } if (Deprecated.Length != 0) { hash ^= Deprecated.GetHashCode(); } if (Hidden != false) { hash ^= Hidden.GetHashCode(); } return(hash); }
public void Generate(StreamWriter sw, string indent, CodeGenerationOptions opt, bool use_base, ClassGen type) { string jni_sig = JniSignature; bool gen_string_overload = Parameters.HasCharSequence && !type.ContainsCtor(jni_sig.Replace("java/lang/CharSequence", "java/lang/String")); System.Collections.Specialized.StringCollection call_cleanup = Parameters.GetCallCleanup(opt); opt.CodeGenerator.WriteConstructorIdField(this, sw, indent, opt); sw.WriteLine("{0}// Metadata.xml XPath constructor reference: path=\"{1}/constructor[@name='{2}'{3}]\"", indent, type.MetadataXPathReference, type.JavaSimpleName, Parameters.GetMethodXPathPredicate()); sw.WriteLine("{0}[Register (\"{1}\", \"{2}\", \"{3}\"{4})]", indent, ".ctor", jni_sig, String.Empty, this.AdditionalAttributeString()); if (Deprecated != null) { sw.WriteLine("{0}[Obsolete (@\"{1}\")]", indent, Deprecated.Replace("\"", "\"\"")); } GenerateCustomAttributes(sw, indent); sw.WriteLine("{0}{1} unsafe {2} ({3})\n{0}\t: {4} (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)", indent, Visibility, Name, GenBase.GetSignature(this, opt), use_base ? "base" : "this"); sw.WriteLine("{0}{{", indent); opt.CodeGenerator.WriteConstructorBody(this, sw, indent + "\t", opt, call_cleanup); sw.WriteLine("{0}}}", indent); sw.WriteLine(); if (gen_string_overload) { sw.WriteLine("{0}[Register (\"{1}\", \"{2}\", \"{3}\"{4})]", indent, ".ctor", jni_sig, String.Empty, this.AdditionalAttributeString()); sw.WriteLine("{0}{1} unsafe {2} ({3})\n{0}\t: {4} (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)", indent, Visibility, Name, GenBase.GetSignature(this, opt).Replace("Java.Lang.ICharSequence", "string").Replace("global::string", "string"), use_base ? "base" : "this"); sw.WriteLine("{0}{{", indent); opt.CodeGenerator.WriteConstructorBody(this, sw, indent + "\t", opt, call_cleanup); sw.WriteLine("{0}}}", indent); sw.WriteLine(); } }
/// <summary> /// Deprecates the clinical trial unit. /// </summary> /// <returns>System.String.</returns> public string DeprecateClinicalTrialUnit() { CTUSearch.SendKeys(cName); PageHelper.WaitForElement(Driver, EditCTU).Click(); Deprecated.Click(); SaveCTUButton.Click(); BackToListButton.Click(); return(cName); }
/// <summary> /// Deprecates a sponsor. /// </summary> /// <returns>System.String.</returns> public string DeprecateASponsor() { SponsorSearch.SendKeys(sName); PageHelper.WaitForElement(Driver, EditSponsor).Click(); Deprecated.Click(); SaveSponsorButton.Click(); BackToListButton.Click(); return(sName); }
public void Generate(StreamWriter sw, string indent, CodeGenerationOptions opt, GenBase type, bool generate_callbacks) { if (!IsValid) { return; } bool gen_as_formatted = IsReturnCharSequence; if (generate_callbacks && IsVirtual) { GenerateCallback(sw, indent, opt, type, null, gen_as_formatted); } string name_and_jnisig = JavaName + JniSignature.Replace("java/lang/CharSequence", "java/lang/String"); bool gen_string_overload = !IsOverride && Parameters.HasCharSequence && !type.ContainsMethod(name_and_jnisig); string static_arg = IsStatic ? " static" : String.Empty; string virt_ov = IsOverride ? " override" : IsVirtual ? " virtual" : String.Empty; if ((string.IsNullOrEmpty(virt_ov) || virt_ov == " virtual") && type.RequiresNew(AdjustedName)) { virt_ov = " new" + virt_ov; } string seal = IsOverride && IsFinal ? " sealed" : null; string ret = opt.GetOutputName(RetVal.FullName); GenerateIdField(sw, indent, opt); if (DeclaringType.IsGeneratable) { sw.WriteLine("{0}// Metadata.xml XPath method reference: path=\"{1}\"", indent, GetMetadataXPathReference(this.DeclaringType)); } if (Deprecated != null) { sw.WriteLine("{0}[Obsolete (@\"{1}\")]", indent, Deprecated.Replace("\"", "\"\"")); } if (IsReturnEnumified) { sw.WriteLine("{0}[return:global::Android.Runtime.GeneratedEnum]", indent); } sw.WriteLine("{0}[Register (\"{1}\", \"{2}\", \"{3}\"{4})]", indent, JavaName, JniSignature, IsVirtual ? ConnectorName : String.Empty, this.AdditionalAttributeString()); GenerateCustomAttributes(sw, indent); sw.WriteLine("{0}{1}{2}{3}{4} unsafe {5} {6} ({7})", indent, Visibility, static_arg, virt_ov, seal, ret, AdjustedName, GenBase.GetSignature(this, opt)); sw.WriteLine("{0}{{", indent); GenerateBody(sw, indent + "\t", opt); sw.WriteLine("{0}}}", indent); sw.WriteLine(); //NOTE: Invokers are the only place false is passed for generate_callbacks, they do not need string overloads if (generate_callbacks && (gen_string_overload || gen_as_formatted)) { GenerateStringOverload(sw, indent, opt); } GenerateAsyncWrapper(sw, indent, opt); }
/// Checks if the setting is current for a specified version, based on /// the Since and/or Deprecated settings. public bool IsCurrent(Version version) { bool current = true; if (IsVersioned) { var from = Since != null?Since.ToVersion() : null; var to = Deprecated != null?Deprecated.ToVersion() : null; current = (from == null || version >= from) && (to == null || version < to); } return(current); }
void GenerateStringOverload(StreamWriter sw, string indent, CodeGenerationOptions opt) { string static_arg = IsStatic ? " static" : String.Empty; string ret = opt.GetOutputName(RetVal.FullName.Replace("Java.Lang.ICharSequence", "string")); if (Deprecated != null) { sw.WriteLine("{0}[Obsolete (@\"{1}\")]", indent, Deprecated.Replace("\"", "\"\"").Trim()); } sw.WriteLine("{0}{1}{2} {3} {4} ({5})", indent, Visibility, static_arg, ret, Name, GenBase.GetSignature(this, opt).Replace("Java.Lang.ICharSequence", "string").Replace("global::string", "string")); sw.WriteLine("{0}{{", indent); GenerateStringOverloadBody(sw, indent + "\t", opt, false); sw.WriteLine("{0}}}", indent); sw.WriteLine(); }
public static AttributeInfo Read(ClassReader classReader, ConstantPool constantPool) { ushort attributeNameIndex = classReader.ReadU2(); string attributeName = Encoding.UTF8.GetString(((ConstantUtf8)constantPool.ConstantPoolInfo[attributeNameIndex]).Bytes); AttributeInfo attributeInfo = null; switch (attributeName) { case "ConstantValue": attributeInfo = new ConstantValue(); break; case "Code": attributeInfo = new Code(); break; case "Deprecated": attributeInfo = new Deprecated(); break; case "LineNumberTable": attributeInfo = new LineNumberTable(); break; case "LocalVariableTable": attributeInfo = new LocalVariableTable(); break; case "SourceFile": attributeInfo = new SourceFile(); break; case "Synthetic": attributeInfo = new Synthetic(); break; case "Exceptions": attributeInfo = new Exceptions(); break; case "Signature": attributeInfo = new Signature(); break; //case "StackMapTable": // attributeInfo = null; default: throw new Exception("no such attribute error"); } attributeInfo.AttributeName = attributeName; attributeInfo.ReadAttributeInfo(classReader, constantPool); return(attributeInfo); }
public void GenerateDeclaration(StreamWriter sw, string indent, CodeGenerationOptions opt, GenBase type, string adapter) { sw.WriteLine("{0}// Metadata.xml XPath method reference: path=\"{1}\"", indent, GetMetadataXPathReference(this.DeclaringType)); if (Deprecated != null) { sw.WriteLine("[Obsolete (@\"{0}\")]", Deprecated.Replace("\"", "\"\"")); } if (IsReturnEnumified) { sw.WriteLine("{0}[return:global::Android.Runtime.GeneratedEnum]", indent); } if (IsInterfaceDefaultMethod) { sw.WriteLine("{0}[global::Java.Interop.JavaInterfaceDefaultMethod]", indent); } sw.WriteLine("{0}[Register (\"{1}\", \"{2}\", \"{3}:{4}\"{5})]", indent, JavaName, JniSignature, ConnectorName, GetAdapterName(opt, adapter), this.AdditionalAttributeString()); GenerateCustomAttributes(sw, indent); sw.WriteLine("{0}{1} {2} ({3});", indent, opt.GetOutputName(RetVal.FullName), AdjustedName, GenBase.GetSignature(this, opt)); sw.WriteLine(); }
protected string[] readJsDocsDeprecated(Deprecated deprecatedInfo, string classFullName, string memberName = null) { List <string> result = new List <string>(); if (deprecatedInfo == null || !this.processor.GenerateJsDocs) { return(null); } if (!String.IsNullOrEmpty(deprecatedInfo.Version)) { result.Add("Since version " + deprecatedInfo.Version + "."); } if (String.IsNullOrEmpty(deprecatedInfo.Text)) { return(result.Count == 0 ? null : result.ToArray <string>()); } try { string deprecatedInfoText = deprecatedInfo.Text; List <string> deprecatedInfoTextLines = this.readJsDocsConvertHtmlToTextLines( ref deprecatedInfoText ); if (deprecatedInfoTextLines.Count > 0) { result.AddRange(deprecatedInfoTextLines); } } catch (InvalidJsDocsFormatException ex) { ex.JsDocsType = JsDocsType.DEPRECATED; ex.ClassFullName = classFullName; if (memberName != null) { ex.MemberName = memberName; } this.processor.Exceptions.Add(ex); } return(result.ToArray <string>()); }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Deprecated != false) { hash ^= Deprecated.GetHashCode(); } hash ^= updatableTo_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
private static void InsertDeprecated(FeaturesContext db, DBBuffer buffer, Dictionary <string, int> dictFeat, Paths Paths, string log) { db.BulkInsert(Deprecated.Import(dictFeat, Paths, log)); buffer.p_Deprecated = db.Deprecated.ToList(); }
public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Home.Length != 0) { hash ^= Home.GetHashCode(); } hash ^= sources_.GetHashCode(); if (Version.Length != 0) { hash ^= Version.GetHashCode(); } if (Description.Length != 0) { hash ^= Description.GetHashCode(); } hash ^= keywords_.GetHashCode(); hash ^= maintainers_.GetHashCode(); if (Engine.Length != 0) { hash ^= Engine.GetHashCode(); } if (Icon.Length != 0) { hash ^= Icon.GetHashCode(); } if (ApiVersion.Length != 0) { hash ^= ApiVersion.GetHashCode(); } if (Condition.Length != 0) { hash ^= Condition.GetHashCode(); } if (Tags.Length != 0) { hash ^= Tags.GetHashCode(); } if (AppVersion.Length != 0) { hash ^= AppVersion.GetHashCode(); } if (Deprecated != false) { hash ^= Deprecated.GetHashCode(); } if (TillerVersion.Length != 0) { hash ^= TillerVersion.GetHashCode(); } hash ^= Annotations.GetHashCode(); if (KubeVersion.Length != 0) { hash ^= KubeVersion.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public bool Equals(DestinyItemCategoryDefinition input) { if (input == null) { return(false); } return (( DisplayProperties == input.DisplayProperties || (DisplayProperties != null && DisplayProperties.Equals(input.DisplayProperties)) ) && ( Visible == input.Visible || (Visible != null && Visible.Equals(input.Visible)) ) && ( Deprecated == input.Deprecated || (Deprecated != null && Deprecated.Equals(input.Deprecated)) ) && ( ShortTitle == input.ShortTitle || (ShortTitle != null && ShortTitle.Equals(input.ShortTitle)) ) && ( ItemTypeRegex == input.ItemTypeRegex || (ItemTypeRegex != null && ItemTypeRegex.Equals(input.ItemTypeRegex)) ) && ( GrantDestinyBreakerType == input.GrantDestinyBreakerType || (GrantDestinyBreakerType != null && GrantDestinyBreakerType.Equals(input.GrantDestinyBreakerType)) ) && ( PlugCategoryIdentifier == input.PlugCategoryIdentifier || (PlugCategoryIdentifier != null && PlugCategoryIdentifier.Equals(input.PlugCategoryIdentifier)) ) && ( ItemTypeRegexNot == input.ItemTypeRegexNot || (ItemTypeRegexNot != null && ItemTypeRegexNot.Equals(input.ItemTypeRegexNot)) ) && ( OriginBucketIdentifier == input.OriginBucketIdentifier || (OriginBucketIdentifier != null && OriginBucketIdentifier.Equals(input.OriginBucketIdentifier)) ) && ( GrantDestinyItemType == input.GrantDestinyItemType || (GrantDestinyItemType != null && GrantDestinyItemType.Equals(input.GrantDestinyItemType)) ) && ( GrantDestinySubType == input.GrantDestinySubType || (GrantDestinySubType != null && GrantDestinySubType.Equals(input.GrantDestinySubType)) ) && ( GrantDestinyClass == input.GrantDestinyClass || (GrantDestinyClass != null && GrantDestinyClass.Equals(input.GrantDestinyClass)) ) && ( TraitId == input.TraitId || (TraitId != null && TraitId.Equals(input.TraitId)) ) && ( GroupedCategoryHashes == input.GroupedCategoryHashes || (GroupedCategoryHashes != null && GroupedCategoryHashes.SequenceEqual(input.GroupedCategoryHashes)) ) && ( ParentCategoryHashes == input.ParentCategoryHashes || (ParentCategoryHashes != null && ParentCategoryHashes.SequenceEqual(input.ParentCategoryHashes)) ) && ( GroupCategoryOnly == input.GroupCategoryOnly || (GroupCategoryOnly != null && GroupCategoryOnly.Equals(input.GroupCategoryOnly)) ) && ( Hash == input.Hash || (Hash.Equals(input.Hash)) ) && ( Index == input.Index || (Index.Equals(input.Index)) ) && ( Redacted == input.Redacted || (Redacted != null && Redacted.Equals(input.Redacted)) )); }
public Platform GetDeprecatedPlatformFor(Platform platform) => Deprecated?.GetPlatform(platform.Name);