public override async Task AddAttributes(AnnotatedCodeBlock block) { if (Package == null && Project?.FullName != null) { block.AddAttribute("data-trydotnet-package", Project.FullName); } var fileName = GetDestinationFileAbsolutePath(); if (!string.IsNullOrWhiteSpace(fileName)) { block.AddAttribute( "data-trydotnet-file-name", fileName); } if (ReadOnlyRegionRoundtrip()) { block.AddAttribute("data-trydotnet-injection-point", "replace"); } bool ReadOnlyRegionRoundtrip() { return(!Editable && !string.IsNullOrWhiteSpace(Region) && SourceFile != null && (DestinationFile == null || SourceFile.Equals(DestinationFile))); } await base.AddAttributes(block); }
private bool Equals([NotNull] T4PathWithMacros other) => string.Equals(RawPath, other.RawPath, StringComparison.OrdinalIgnoreCase) && SourceFile.Equals(other.SourceFile);
protected bool Equals(UnityAssetFindResult other) { return(SourceFile.Equals(other.SourceFile) && AttachedElement.Equals(other.AttachedElement)); }
protected bool Equals(UnityAssetFindResult other) { return(SourceFile.Equals(other.SourceFile) && OwningElemetLocation.Equals(other.OwningElemetLocation)); }
protected bool Equals(UnityAssetOccurrence other) { return(SourceFile.Equals(other.SourceFile) && AttachedElementLocation.Equals(other.AttachedElementLocation)); }