1 write to Type
Microsoft.TemplateEngine.Abstractions (1)
Constraints\TemplateConstraintInfo.cs (1)
24Type = type;
17 references to Type
Microsoft.TemplateEngine.Edge (16)
_generated\21\TemplateCacheJsonSerializerContext.TemplateConstraintInfo.g.cs (2)
58Getter = static obj => ((global::Microsoft.TemplateEngine.Abstractions.Constraints.TemplateConstraintInfo)obj).Type, 107string __value_Type = ((global::Microsoft.TemplateEngine.Abstractions.Constraints.TemplateConstraintInfo)value).Type;
Settings\TemplateInfoReader.cs (2)
126string? type = item.ToString(nameof(TemplateConstraintInfo.Type)); 129throw new ArgumentException($"{nameof(entry)} has {nameof(info.Constraints)} property which item doesn't have {nameof(TemplateConstraintInfo.Type)}.", nameof(entry));
TemplateConstraintManager.cs (12)
46List<string> uniqueConstraints = templates.SelectMany(ti => ti.Constraints.Select(c => c.Type)).Distinct().ToList(); 150var requiredConstraints = templates.SelectMany(t => t.Constraints).Select(c => c.Type).Distinct(); 188if (!_templateConstrains.TryGetValue(constraint.Type, out Task<ITemplateConstraint> task)) 190_logger.LogDebug($"The constraint '{constraint.Type}' is unknown."); 191constraintResults.Add(TemplateConstraintResult.CreateInitializationFailure(constraint.Type, string.Format(LocalizableStrings.TemplateConstraintManager_Error_UnknownType, constraint.Type))); 198_logger.LogDebug($"The constraint '{constraint.Type}' failed to be initialized, details: {exception}."); 199constraintResults.Add(TemplateConstraintResult.CreateInitializationFailure(constraint.Type, string.Format(LocalizableStrings.TemplateConstraintManager_Error_FailedToInitialize, constraint.Type, exception?.Message))); 209_logger.LogDebug($"The constraint '{constraint.Type}' failed to be evaluated for the args '{constraint.Args}', details: {e}."); 210constraintResults.Add(TemplateConstraintResult.CreateEvaluationFailure(_templateConstrains[constraint.Type].Result, string.Format(LocalizableStrings.TemplateConstraintManager_Error_FailedToEvaluate, constraint.Type, constraint.Args, e.Message)));
Microsoft.TemplateEngine.Utils (1)
WellKnownSearchFilters.cs (1)
239var matchingConstraints = template.Constraints.Where(c => c.Type == constraintDefinition.Type);