Infrastructure

C# 8 nullable reference types

C# 8 nullable reference types

In the previous article, we discussed C# 8 default interface methods. In this article, we’ll look at C# 8 nullable reference types. Reference types refer to an object that is on the heap. When there is no object to refer to, the value is null. Sometimes null is an acceptable value, but often it is an illegal value that leads to ArgumentNullExceptions and NullReferenceExceptions.

C# 8 finally gives us the ability to express whether a variable shouldn’t be null, and when it can be null. Based on these annotations, the compiler will warn you when you are potentially using a null reference, or passing a null reference to a function that won’t accept it.

Continue reading “C# 8 nullable reference types”

Share
C# 8 default interface methods

C# 8 default interface methods

In the previous articles, we discussed C# 8 async streams and pattern matching. In this article, we’ll look at C# 8 default interface methods.

Extending interfaces

Before C# 8, it was not possible to add members to an interface without breaking the classes that implement the interface. Because interface members were abstract, classes needed to provide an implementation. C# 8 allows us to extend an interface and provide a default implementation. The runtime (which also needs to support this feature) uses the default implementation when the class does not provide it:

interface IOutput
{
    void PrintMessage(string message);
    void PrintException(Exception exception)
        => PrintMessage($"Exception: {exception}");
}
class ConsoleOutput : IOutput
{
    public void PrintMessage(string message)
        => Console.WriteLine(message);
}

In this example, ConsoleOutput does not provide an implementation for PrintException. When PrintException is called against a ConsoleOutput instance, the default method from the IOutput interface will be called. ConsoleOutput might provide its own implementation.

Continue reading “C# 8 default interface methods”

Share
Red Hat simplifies container development and redistribution of Red Hat Enterprise Linux packages

Red Hat simplifies container development and redistribution of Red Hat Enterprise Linux packages

Application developers in the Red Hat Partner Connect program can now build their container apps and redistribute them from the full set of Red Hat Enterprise Linux (RHEL) user space packages (non-kernel). This nearly triples the number of packages over UBI only.

When we introduced Red Hat Universal Base Images (UBI) in May 2019, we provided Red Hat partners the ability to freely use and redistribute a substantial number of RHEL packages that can be deployed on both Red Hat and non-Red Hat platforms. This gave developers the ability to build safe, secure, and portable container-based software that could then be deployed anywhere. The feedback on this has been overwhelmingly positive and we thank you for it, but we learned that you needed more, so we’re sharing this advanced preview with Red Hat Partner Connect members to help you with your planning. 

Expanded and exclusive redistribution rights for Red Hat Technology Partners

We are pleased to announce expanded partner terms and conditions that grant Red Hat Technology Partners free use and redistribution rights to all Red Hat Enterprise Linux user space packages when you build upon UBI-based images. With more than triple the number of RHEL packages now available, you can simplify your container and Operator development and freely re-distribute your container-based software through both Red Hat and non-Red Hat registries. This is only available to Red Hat partners who participate in and complete Red Hat Container Certification.

Continue reading “Red Hat simplifies container development and redistribution of Red Hat Enterprise Linux packages”

Share
C# 8 asynchronous streams

C# 8 asynchronous streams

.NET Core 3.1 (December 2019) includes support for C# 8, a new major
version of the C# programming language. In this series of articles, we’ll look at the new features in .NET’s main programming language. This first article, in particular, looks at asynchronous streams. This feature makes it easy to create and consume asynchronous enumerables, so before getting into the new feature, you first need to understand the IEnumerable interface.

Note: C# 8 can be used with the .NET Core 3.1 SDK, which is available on Red Hat Enterprise Linux, Fedora, Windows, macOS, and on other Linux distributions.

A brief history of IEnumerable

The classic IEnumerable<T> has been around since .NET Framework 2 (2005). This interface provides us with a type-safe way to iterate over any collection.

The iteration is based on the IEnumerator<T> type:

Continue reading “C# 8 asynchronous streams”

Share
Introducing new Red Hat Enterprise Linux certification for software partner products

Introducing new Red Hat Enterprise Linux certification for software partner products

We are pleased to announce an improved software certification for Red Hat partner products built for Red Hat Enterprise Linux 8 (RHEL 8). This new RHEL software certification validates the use of common best practices, improves joint supportability, and promotes your product in the new Red Hat Ecosystem Catalog.

What is this certification?

This certification now features a partner executable test suite that produces results that are then reviewed by Red Hat. Your non-containerized software is certified when the test results show successful interoperability with Red Hat Enterprise Linux 8 in a secure, supportable manner using best practices. Once verified, you can promote your product(s) in the Red Hat Ecosystem catalog.

In addition, Red Hat will grant partners a complimentary Limited membership to TSANet for collaborative customer case management to improve their ongoing user experiences.

Continue reading “Introducing new Red Hat Enterprise Linux certification for software partner products”

Share
Red Hat support for Node.js

Red Hat support for Node.js

Node.js Foundation Logo

For the past two years, Red Hat Middleware has provided a supported Node.js runtime on Red Hat OpenShift as part of Red Hat Runtimes. Our goal has been to provide rapid releases of the upstream Node.js core project, example applications to get developers up and running quickly, Node.js container images, integrations with other components of Red Hat’s cloud-native stack, and (of course) provide world-class service and support for customers. Earlier this year, the team behind Red Hat’s distribution and support of Node.js even received a “Devie” award from DeveloperWeek for this work, further acknowledging Red Hat’s role in supporting the community and ecosystem.

Red Hat Node.js experts at your fingertips

Red Hat collaborates in more ways than one with the fastest growing runtimes used in business-critical applications on the cloud by contributing to the community, being part of the Technical Steering Committee, and even participating and driving strategic initiatives to carve the future of Node.js. Combining this work with our Red Hat Enterprise Linux (RHEL) and OpenShift expertise, we can help you reach your goals of delivering and supporting business-critical applications on and off the cloud.

Continue reading “Red Hat support for Node.js”

Share
Tracing .NET Core applications

Tracing .NET Core applications

In this article, we’ll look at different ways of collecting and inspecting events from the .NET Core runtime and base class library (BCL).

EventListener

The EventListener class allows us to get events of the running application. Let’s learn how to use it with an example application. Our application performs an HTTP get and prints the length of the received response.

Continue reading “Tracing .NET Core applications”

Share