I have created a partial class for my xsd auto generated class. The problem is in debugging this partial class. Breakpoint are not recognized or the compiler doesn't break at the breakpoints set in the partial class.
// Autogenerated class by xsd.exe
public partial class Class1
{
private Class1Brand[] brandField;
private string Class1guidField;
.....
}
// Debug Part - probably in a different file
public partial class Class1
{
public static Validity setValidity(Validity validity)
{
// ********* BREAKPOINT IS SET ON THE NEXT LINE ***********
validity.LastVerified = DateTime.Now;
//certificates are only updated within 14 days before expiry date
TimeSpan tsCheck = validity.NotAfter - validity.LastVerified;
if (tsCheck.Days <= 14)
{
DateTime dtNotBefore = validity.NotAfter.AddDays(conf.validityPeriod());
if (validity.NotAfter > DateTime.Now)
{
dtNotBefore = validity.NotAfter;
}
else
{
dtNotBefore = DateTime.Now;
}
validity.NotBefore = dtNotBefore;
validity.NotAfter = dtNotBefore.AddDays(conf.validityPeriod());
}
return validity;
}
}